I have 2 dataframes that I'd like to merge.
The first df summarizes the top 5 most common venues in each town:
The second df summarizes the frequencies of each venue category in each town:
I'd like to merge both dataframes so that the frequency of each of the top 5 venues would also appear in the first df.
For eg.
Output on row 0:
Ang Mo Kio | Food Court | Coffee Shop | Dessert Shop | Chinese Restaurant | Jap Restaurant | 0.64 | 0.2 | 0.1 | ....
I've tried using .merge pandas
sg_venues_sorted.merge(sg_onehot_grouped, on='Town')
but that seems to be only for merging on index or column names. What if my merge is on column names of 1 df, and values of the other df?
Thanks!