In an earlier post I created an ungrouped frequency distribution in Excel, and that post can be read here:- https://medium.com/@tracyrenee61/use-excels-pivot-table-to-create-an-ungrouped-frequency-distribution-436fe45e02ed
In this video I intend to use basically the same data that had been used to make an ungrouped frequency distribution in Excel to obtain the same result in Python.
I have used Google Colab, a free online Jupyter Notebook hosted by Google, to create the program used in this post.
The first thing that I did, after creating the Jupyter Notebook, was to import the libraries that I would need to execute the program, being:-
- Pandas to create the dataframe and process the data and
- Matplotlib to visualise the data.
I then created a small dataframe of 15 rows of data that contained the following features:-
- Name,
- Team, and
- Score.
I used the pandas;’ value_counts() function to create an ungrouped frequency distribution of the teams. I find…