質問編集履歴
3
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -21,6 +21,14 @@
|
|
21
21
|
※この時のdf['date']の形式は2020‐01‐01、typeはdatetime64[ns]
|
22
22
|
|
23
23
|
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
```
|
24
32
|
|
25
33
|
#df['date']の中身確認
|
26
34
|
|
@@ -47,6 +55,8 @@
|
|
47
55
|
7 2021-07-30
|
48
56
|
|
49
57
|
Name: date, dtype:datetime64[ns]
|
58
|
+
|
59
|
+
```
|
50
60
|
|
51
61
|
-------
|
52
62
|
|
2
df['date']の中身の確認処理と出力結果を追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -19,6 +19,36 @@
|
|
19
19
|
df['date'] = pd.to_datetime(df['date'])
|
20
20
|
|
21
21
|
※この時のdf['date']の形式は2020‐01‐01、typeはdatetime64[ns]
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
#df['date']の中身確認
|
26
|
+
|
27
|
+
df['date']
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
※以下出力結果-----
|
32
|
+
|
33
|
+
0 2021-07-16
|
34
|
+
|
35
|
+
1 2021-07-16
|
36
|
+
|
37
|
+
2 2021-07-23
|
38
|
+
|
39
|
+
3 2021-07-23
|
40
|
+
|
41
|
+
4 2021-07-27
|
42
|
+
|
43
|
+
5 2021-07-27
|
44
|
+
|
45
|
+
6 2021-07-30
|
46
|
+
|
47
|
+
7 2021-07-30
|
48
|
+
|
49
|
+
Name: date, dtype:datetime64[ns]
|
50
|
+
|
51
|
+
-------
|
22
52
|
|
23
53
|
|
24
54
|
|
1
import部分追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,6 +3,12 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
ソース:
|
6
|
+
|
7
|
+
import pandas as pd
|
8
|
+
|
9
|
+
import datetime as dt
|
10
|
+
|
11
|
+
|
6
12
|
|
7
13
|
today = dt.datetime.today()
|
8
14
|
|