Reputation: 123
Actually, I didn't really understand how to ask this question. But I have a dataset that look like this
My purpose is to plot the data into multiple classes, that look like this
Using this syntax,
df_group.plot(kind='bar', figsize=(8, 6))
I got something like this
Actually how to concatenate the room_type, so it can be displayed in one place
I was uploaded my dataset here
Is somebody know how to plot into one like that?
Any help would be appreciated
Thanks
Upvotes: 0
Views: 86
Reputation: 150745
Try unstack:
# change 'room_type' to 'neighbor_group' if you prefer the other way.
df_group['price'].unstack('room_type').plot.bar()
Upvotes: 1