teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

実行結果を追記

2020/06/22 14:37

投稿

yymmt
yymmt

スコア1615

answer CHANGED
@@ -26,6 +26,7 @@
26
26
  df.index = pd.DatetimeIndex(pd.to_datetime(df.date, format="%Y-%m-%d"))
27
27
  df.drop("date", axis=1, inplace=True)
28
28
  df_1day = df.resample("1D").sum()
29
+ print(df_1day)
29
30
 
30
31
  # グラフ表示
31
32
  fig, ax = plt.subplots(1, 1, figsize=(12, 4))
@@ -35,4 +36,14 @@
35
36
  plt.grid()
36
37
  plt.show()
37
38
  ```
39
+
40
+ 実行結果
41
+ ```terminal
42
+ person
43
+ date
44
+ 2020-03-11 4
45
+ 2020-03-12 7
46
+ 2020-03-13 7
47
+ ```
48
+
38
49
  ![グラフ結果](9658fbe645dcdccf5d29dfefe26fc396.png)