mmyjh86

[파이스탁-까페] Upbits 일봉 재정렬

Oct 20th, 2019
208
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pyupbit
  2.  
  3. df = pyupbit.get_ohlcv("KRW-XRP", "minute60")
  4. how = {'open': 'first', 'high': 'max', 'low': 'min', 'close': 'last',
  5.            'volume': 'sum'}
  6. df = df.resample('D').apply(how)
  7. print(df)
RAW Paste Data