回答編集履歴

2

修正

2020/08/21 06:39

投稿

tiitoi
tiitoi

スコア21956

test CHANGED
@@ -30,7 +30,7 @@
30
30
 
31
31
  )
32
32
 
33
- time = pd.to_datetime(df["日付"] + "T" + df["時間"])
33
+ time = pd.to_datetime(df["日付"] + " " + df["時間"])
34
34
 
35
35
  print(time)
36
36
 

1

修正

2020/08/21 06:39

投稿

tiitoi
tiitoi

スコア21956

test CHANGED
@@ -30,24 +30,22 @@
30
30
 
31
31
  )
32
32
 
33
- pd.to_datetime(df["時間"])
33
+ time = pd.to_datetime(df["日付"] + "T" + df["時間"])
34
34
 
35
- ```
35
+ print(time)
36
36
 
37
37
 
38
38
 
39
- ```
39
+ # 0 2020-04-11 12:36:19.860
40
40
 
41
- 0 2020-08-21 12:36:19.860
41
+ # 1 2020-04-11 12:36:19.960
42
42
 
43
- 1 2020-08-21 12:36:19.960
43
+ # 2 2020-04-11 12:36:20.000
44
44
 
45
- 2 2020-08-21 12:36:20.000
45
+ # 3 2020-04-11 12:36:20.150
46
46
 
47
- 3 2020-08-21 12:36:20.150
47
+ # 4 2020-04-11 12:36:20.260
48
48
 
49
- 4 2020-08-21 12:36:20.260
50
-
51
- Name: 時間, dtype: datetime64[ns]
49
+ # dtype: datetime64[ns]
52
50
 
53
51
  ```