
3주차 과제하는데 강의자료 코드를 그대로 사용하는데 오류가 뜹니다ㅜ

작성한 코드 및 에러 메세지
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-7-2ac158428019> in <cell line: 6>()
4
5 format='%Y-%m-%dT%H:%M:%S.%f'
----> 6 sparta_data['done_date_time'] = pd.to_datetime(sparta_data['done_date'], format=format)
7 sparta_data.tail(5)
8
2 frames
/usr/local/lib/python3.10/dist-packages/pandas/core/tools/datetimes.py in _array_strptime_with_fallback(arg, name, utc, fmt, exact, errors)
465 Call array_strptime, with fallback behavior depending on 'errors'.
466 """
--> 467 result, tz_out = array_strptime(arg, fmt, exact=exact, errors=errors, utc=utc)
468 if tz_out is not None:
469 unit = np.datetime_data(result.dtype)[0]
strptime.pyx in pandas._libs.tslibs.strptime.array_strptime()
strptime.pyx in pandas._libs.tslibs.strptime.array_strptime()
strptime.pyx in pandas._libs.tslibs.strptime._parse_with_format()
ValueError: time data "2020-08-07 12:02:16" doesn't match format "%Y-%m-%dT%H:%M:%S.%f", at position 0. You might want to try:
- passing `format` if your strings have a consistent format;
- passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;
- passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.
