Learn how to use the Pandas Value_Counts method to create frequency tables of a column in your dataframe. You'll learn how to include missing values, create percentages, and combine it with the groupby method.
The written tutorial can be found here: https://datagy.io/pandas-value_counts/
0:00 Introduction
0:38 Loading Dataset
1:13 Pandas Value_Counts Function
2:16 Pandas Value_Counts Normalize
3:29 Pandas Value_Counts Dropna
4:38 Pandas Value_Counts Bins
6:10 Pandas Value_Counts and GroupBy
7:14 Conclusion
To create the dataframe, use the following dictionary:
data = {'Level': ['Beginner', 'Intermediate', 'Advanced', 'Beginner', 'Intermediate', 'Advanced', 'Beginner', 'Intermediate', 'Advanced', 'Beginner', 'Intermediate', 'Advanced', 'Beginner', 'Intermediate', 'Advanced', 'Beginner', 'Intermediate', 'Advanced'], 'Students': [10.0, 20.0, 10.0, 40.0, 20.0, 10.0, np.nan, 20.0, 20.0, 40.0, 10.0, 30.0, 30.0, 10.0, 10.0, 10.0, 40.0, 20.0]}
Learn Python programming the right way!
----------------------------------------------------------
✅ Check out my eBook to get started with Python for Data Science: https://gumroad.com/l/introtopythonfo...
✅ Follow me on other platforms:
Website: https://datagy.io
Twitter: / datagyio
Mailing List: https://mailchi.mp/f6a58f2d73d0/datag... (and get a FREE Pandas tip and tricks book and a FREE Guide to SQL)