Fixing the 'BV' key being missing for USDT
This commit is contained in:
parent
f6df701b84
commit
960d088deb
@ -30,8 +30,9 @@ def parse_ticker_dataframe(ticker: list) -> DataFrame:
|
|||||||
"""
|
"""
|
||||||
columns = {'C': 'close', 'V': 'volume', 'O': 'open', 'H': 'high', 'L': 'low', 'T': 'date'}
|
columns = {'C': 'close', 'V': 'volume', 'O': 'open', 'H': 'high', 'L': 'low', 'T': 'date'}
|
||||||
frame = DataFrame(ticker) \
|
frame = DataFrame(ticker) \
|
||||||
.drop('BV', 1) \
|
|
||||||
.rename(columns=columns)
|
.rename(columns=columns)
|
||||||
|
if 'BV' in frame:
|
||||||
|
frame.drop('BV', 1, inplace=True)
|
||||||
frame['date'] = to_datetime(frame['date'], utc=True, infer_datetime_format=True)
|
frame['date'] = to_datetime(frame['date'], utc=True, infer_datetime_format=True)
|
||||||
frame.sort_values('date', inplace=True)
|
frame.sort_values('date', inplace=True)
|
||||||
return frame
|
return frame
|
||||||
|
@ -196,7 +196,6 @@ def ticker_history():
|
|||||||
"C": 8.88e-05,
|
"C": 8.88e-05,
|
||||||
"V": 991.09056638,
|
"V": 991.09056638,
|
||||||
"T": "2017-11-26T08:50:00",
|
"T": "2017-11-26T08:50:00",
|
||||||
"BV": 0.0877869
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"O": 8.88e-05,
|
"O": 8.88e-05,
|
||||||
@ -205,7 +204,6 @@ def ticker_history():
|
|||||||
"C": 8.893e-05,
|
"C": 8.893e-05,
|
||||||
"V": 658.77935965,
|
"V": 658.77935965,
|
||||||
"T": "2017-11-26T08:55:00",
|
"T": "2017-11-26T08:55:00",
|
||||||
"BV": 0.05874751
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"O": 8.891e-05,
|
"O": 8.891e-05,
|
||||||
@ -214,6 +212,5 @@ def ticker_history():
|
|||||||
"C": 8.877e-05,
|
"C": 8.877e-05,
|
||||||
"V": 7920.73570705,
|
"V": 7920.73570705,
|
||||||
"T": "2017-11-26T09:00:00",
|
"T": "2017-11-26T09:00:00",
|
||||||
"BV": 0.7039405
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user