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

質問編集履歴

1

エラーメッセージの追記

2020/05/29 03:58

投稿

norisukesan
norisukesan

スコア2

title CHANGED
File without changes
body CHANGED
@@ -15,4 +15,31 @@
15
15
 
16
16
  追記:
17
17
  僕の他の質問のところでも記しているのですが、
18
- これの目的は24時間のx軸の散布図をプロットすることです
18
+ これの目的は24時間のx軸の散布図をプロットすることです
19
+
20
+ #エラーメッセージ
21
+ ```エラー
22
+ ValueError Traceback (most recent call last)
23
+ <ipython-input-57-eeca62a1aff4> in <module>
24
+ 17 xlist=str(xlist)
25
+ 18 #時間(文字列)をtime型に変換
26
+ ---> 19 xlist=datetime.datetime.strptime(xlist, "%H:%M:%S").time()
27
+ 20 #xlist=time(xlist,"%H:%M:%S")
28
+ 21
29
+
30
+ ~\anaconda3\lib\_strptime.py in _strptime_datetime(cls, data_string, format)
31
+ 575 """Return a class cls instance based on the input string and the
32
+ 576 format string."""
33
+ --> 577 tt, fraction, gmtoff_fraction = _strptime(data_string, format)
34
+ 578 tzname, gmtoff = tt[-2:]
35
+ 579 args = tt[:6] + (fraction,)
36
+
37
+ ~\anaconda3\lib\_strptime.py in _strptime(data_string, format)
38
+ 357 if not found:
39
+ 358 raise ValueError("time data %r does not match format %r" %
40
+ --> 359 (data_string, format))
41
+ 360 if len(data_string) != found.end():
42
+ 361 raise ValueError("unconverted data remains: %s" %
43
+
44
+ ValueError: time data '0 08:40:00\n1 08:50:00\n2 09:00:00\n3 09:10:00\n4 09:20:00\n ... \n10571 14:30:00\n10572 14:40:00\n10573 14:50:00\n10574 15:00:00\n10575 15:10:00\nName: dtime, Length: 10576, dtype: object' does not match format '%H:%M:%S'
45
+ ```