승훈(저번 주 기록에 이어짐)
DataReader 네이버의 경우에는 string이라서 자료형 바꿔줘야 함
start = datetime(2003, 1, 1)
end = datetime(2022, 3, 29)
KIA = web.DataReader('000270','naver',start,end)
KIA.head()
[해결법]
하평
KIA['Open'] = KIA['Open'].astype(float)
KIA['High'] = KIA['High'].astype(float)
KIA['Low'] = KIA['Low'].astype(float)
KIA['Close'] = KIA['Close'].astype(float)
KIA['Volume'] = KIA['Volume'].astype(int)
# 확인
KIA.dtypes
Open float64
High float64
Low float64
Close float64
Volume int32
dtype: object
경욱
start = datetime(2021, 1, 1)
end = datetime(2022, 3, 29)
KIA = web.DataReader('000270','naver',start,end) # naver 는 모든 열 문자형
print(KIA.head())
KIA = KIA.astype('int')
KIA['Close'].plot(figsize=(12,6), grid=True);
4월 9일 저녁
4월 7일 (목) PM 10:00