简体   繁体   English

以时间序列方式为多个属性绘制数据

[英]Plotting the data in a time-series manner for multiple attributes

I am trying to visualize the data in Jupyter notebook based in the shape of time-series. 我试图以时间序列的形式可视化Jupyter笔记本中的数据。 The data is representing the sales of a store for each month of years 2013, 2014 and 2015. So, each year should be represented by a line, where x axis is the months and y axis shows the sales. 数据代表商店在2013、2014和2015年每个月的销售额。因此,每年应该用一条线表示,其中x轴为月份,y轴为销售额。 Even though, I can select the data in a table, I have difficulties plotting them on a time-series chart. 即使可以选择表中的数据,也很难将它们绘制在时间序列图上。 What is the best way to actually plot this data in Jupyter notebook? 在Jupyter Notebook中实际绘制此数据的最佳方法是什么?

The data looks like the following: 数据如下所示:

在此处输入图片说明

Try: 尝试:

monthlySales['sales'].unstack().plot()

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM