我正在处理一个twitter数据,我想绘制它以显示一天中有多少推文发生。我使用groupby函数来计算有多少条推文出现。date数据类型已转换为datetime。它看起来大致是这样的。 date tweet2020-02-13 10:04:16 4 我尝试了这段代码,但得到了一个ValueError: x and y must have same first dimension fig, ax = plt.subplots()
ax.plot_date(df['date'], df[
然而,当我试图从pandas.plotting导入一些东西时,im得到了一个错误。这可能是什么原因?以下是输出的样子:>>> from pandas.plotting import scatter_matrix File "<stdin>", line 1, in <module>
ImportError: No module named plotting</em
我有一系列要绘制为pandas.plotting.parallel_coordinates的测量值,其中每条线的颜色由一个pandas.column的值给出。largeDataFrames.sort_values(column_for_line_color_derivation, inplace=True, ascending=True)
# here comes the actual plotting
我尝试创建一个parallel_coordinates图,其中的线条颜色指示一个信号的值。情节的输出很好:但我想在这个情节中添加一个色条传说来解释颜色的含义。plt.colorbar(thePlot)
使用AttributeError: 'AxesSubplot' object has no attribute '