-
카테고리
-
세부 분야
데이터 분석
-
해결 여부
미해결
6:00 부터 다음과 같은 TypeError 가 발생합니다
20.09.20 13:51 작성 조회수 801
2
pd.to_datetime("2020_"+df["확진일"].str.replace(".","_"))
df["확진일"]
TypeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/pandas/core/arrays/datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object) 1857 try: -> 1858 values, tz_parsed = conversion.datetime_to_datetime64(data) 1859 # If tzaware, these values represent unix timestamps, so we
pandas/_libs/tslibs/conversion.pyx in pandas._libs.tslibs.conversion.datetime_to_datetime64()
TypeError: Unrecognized value type: <class 'str'>
During handling of the above exception, another exception occurred:
ParserError Traceback (most recent call last)
pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime()
pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime()
pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime_object()
pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime_object()
pandas/_libs/tslibs/parsing.pyx in pandas._libs.tslibs.parsing.parse_datetime_string()
/usr/local/lib/python3.6/dist-packages/dateutil/parser/_parser.py in parse(self, timestr, default, ignoretz, tzinfos, **kwargs) 647 648 if res is None: --> 649 raise ParserError("Unknown string format: %s", timestr) 650 651 if len(res) == 0:
ParserError: Unknown string format: 2020_6_30_
답변을 작성해보세요.
답변 3