Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.01 KB

20220404 (Mon) 어쩔넘파이 스터디 (7장).md

File metadata and controls

60 lines (40 loc) · 1.01 KB

20220404 (Mon) 어쩔넘파이 (7장)

1. Errors

승훈(저번 주 기록에 이어짐)

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);

2. 책거리 날짜

4월 9일 저녁

3. 다음 스터디

4월 7일 (목) PM 10:00