Closed jaehyun0220 closed 1 year ago
코드 : from pykrx import stock df = stock.get_market_trading_value_by_date("20210115", "20210122", "005930") print(df.head())
TypeError Traceback (most recent call last) C:\Users\clay_desktop\AppData\Roaming\Python\Python37\site-packages\pandas\core\arrays\datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object) 1860 try: -> 1861 values, tz_parsed = conversion.datetime_to_datetime64(data) 1862 # 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:
ValueError Traceback (most recent call last)
버전을 확인해 주실 수 있나요?
import pykrx print(pykrx.__version__)
웹 스크래핑이다 보니 웹 서버가 변경되는 일이 빈번합니다. 따라서 많은 경우 버전을 업데이트하면 해결됩니다. pip install -U pykrx
pip install -U pykrx
업데이트 했더니 제대로 동작합니다!! 감사합니다!!
코드 : from pykrx import stock df = stock.get_market_trading_value_by_date("20210115", "20210122", "005930") print(df.head())
Error 메시지: ValueError: time data -562,644,916,900 doesn't match format specified
TypeError Traceback (most recent call last) C:\Users\clay_desktop\AppData\Roaming\Python\Python37\site-packages\pandas\core\arrays\datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object) 1860 try: -> 1861 values, tz_parsed = conversion.datetime_to_datetime64(data) 1862 # 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:
ValueError Traceback (most recent call last)