Home > Blockchain >  Python & Pandas: Plotting a Pivot with multiple Indexes
Python & Pandas: Plotting a Pivot with multiple Indexes

Time:06-25

Hi to all the experts,

I'm new to Python and Data Science and actually I'm learning with a real world example to get into Data Science.

I loaded already a CSV and did some work on the data. That's ok. I have the following dataframe:

enter image description here

Unstacked Bar graph

Change stacked = True to stacked = False to see the bars next to each other, if you are not a fan of stacked bars

enter image description here

Line Graphs You can also use line graphs, but not my personal preference. Replace the plot.bar line in above code to

dfg['Amount'].unstack().plot(kind='line', marker='o', ax=ax, legend = False)

enter image description here

  • Related