Issue
Plotting data from a DataFrame into a line plot excludes "dates" on the x axis.
north_result = list(data.aggregate(pipeline))
dates =['Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar','Apr','May']
north_result_df = pd.DataFrame(north_result, index=dates)
north_result_df.index.name = 'Months'
north_result_df.plot.line()

Line plot requires dates just above 'months' on the x axis. Dates show if they are numeric and not strings...any help would be greatly appreciated! As you can tell i am pretty new to Pandas...
Solution
north_result = list(data.aggregate(pipeline))
dates =['Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar','Apr','May']
north_result_df = pd.DataFrame(north_result, index=dates)
north_result_df.index.name = 'Months'
plt.plot(north_result_df.index, north_result_df["total"])
plt.show()
you can use pyplot
import matplotlib.pyplot as plt
north_result =[5,6,7,2,8,5,4,8,9,4,1,5]
dates =['Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar','Apr','May']
north_result_df = pd.DataFrame(north_result, index=dates)
north_result_df.index.name = 'Months'
plt.plot(north_result_df)
plt.show()
the result will be like:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With