84669 人が学習中
152542 人が学習中
20005 人が学習中
5487 人が学習中
7821 人が学習中
359900 人が学習中
3350 人が学習中
180660 人が学習中
48569 人が学習中
18603 人が学習中
40936 人が学習中
1549 人が学習中
1183 人が学習中
32909 人が学習中
df:
試試astype()轉換型別,參見stackoverflow
%matplotlib inline import pandas as pd df = pd.DataFrame.from_csv('timeseries.tsv', sep="\t") df['total_col'] = df['total_col'].astype(float) df['create_time'] = df['create_time'].astype('datetime64[D]') df.set_index(['create_time']).plot(kind='bar')
plt.bar(df['create_time'], df['total_col'], width, color='r', label='total_col')
里面的left, height参数应该是数值形的list,你现在df['create_time']传递的是时间类型的列表
試試astype()轉換型別,參見stackoverflow
里面的left, height参数应该是数值形的list,你现在df['create_time']传递的是时间类型的列表