From b2a15b86eac756192c5f3bba06c40bd889d6ff1a Mon Sep 17 00:00:00 2001 From: moshferatu Date: Fri, 22 Nov 2024 11:44:18 -0800 Subject: [PATCH] Re-order daily data columns and rename volume column --- iqfeed/iqfeed.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iqfeed/iqfeed.py b/iqfeed/iqfeed.py index 7f3869a..f52105a 100644 --- a/iqfeed/iqfeed.py +++ b/iqfeed/iqfeed.py @@ -55,7 +55,9 @@ def get_daily_data(symbol: str, start_date: datetime, end_date: datetime) -> pd. data['Date'] = data['Date'].dt.date data = data[(data['Date'] >= start_date.date()) & (data['Date'] <= end_date.date())] data = data.reset_index(drop = True) - return data + + data = data.rename(columns = { 'Total Volume': 'Volume' }) + return data[daily_columns] def seconds(value): return value