| 1st Most Common Value | 2nd Most Common Value | 3rd Most Common Value | 4th Most Common Value | 5th Most Common Value | |-----------------------|-----------------------|-----------------------|-----------------------|-----------------------| | Grocery Store | Pub | Coffee Shop | Clothing Store | Park | | Pub | Grocery Store | Clothing Store | Park | Coffee Shop | | Hotel | Theatre | Bookstore | Plaza | Park | | Supermarket | Coffee Shop | Pub | Park | Cafe | | Pub | Supermarket | Coffee Shop | Cafe | Park | The name of the dataframe is df0. As you can see there are many values repeating in all the columns. So I want to create a dataframe which has all the unique values with their frequencies from all the columns. Can someone please help with the code since I want to create a Bar plot of it?
The Output should be as follows:
| Venues | Count | |----------------|-------| | Bookstore | 1 | | Cafe | 2 | | Coffee Shop | 4 | | Clothing Store | 2 | | Grocery Store | 2 | | Hotel | 1 | | Park | 5 | | Plaza | 1 | | Pub | 4 | | Supermarket | 2 | | Theatre | 1 |
.value_counts()for each column?