바뀜

194 바이트 추가됨 ,  2022년 8월 10일 (수) 23:08
23번째 줄: 23번째 줄:  
|캔들차트 그리기
 
|캔들차트 그리기
 
|chart에 그려줌을 지정한다. res는 결과를 담고 있는 dataframe.
 
|chart에 그려줌을 지정한다. res는 결과를 담고 있는 dataframe.
 +
 +
 +
candlestick2_ohlc 이 멍청이는 index가 시간데이터면 인지를 못한다.
 +
 +
<code>df = df.astype({'time': 'str'})</code>로 데이터형을 문자형으로 바꾸어주어야 한다.
 
|<syntaxhighlight lang="python">
 
|<syntaxhighlight lang="python">
 
mpl_finance.candlestick2_ohlc(chart, res['start'], res['high'], res['low'], res['close'], width=0.5,
 
mpl_finance.candlestick2_ohlc(chart, res['start'], res['high'], res['low'], res['close'], width=0.5,