Build columns only for dataframe output

kivy_mainline_and_py3.8
Tyler Goodlet 2018-05-08 23:53:20 -04:00
parent bcaef70612
commit 9b34aac0fd
1 changed files with 2 additions and 2 deletions

View File

@ -96,9 +96,9 @@ def quote(loglevel, broker, tickers, df_output):
log.error(f"No quotes could be found for {tickers}?") log.error(f"No quotes could be found for {tickers}?")
return return
if df_output:
cols = next(filter(bool, quotes.values())).copy() cols = next(filter(bool, quotes.values())).copy()
cols.pop('symbol') cols.pop('symbol')
if df_output:
df = pd.DataFrame( df = pd.DataFrame(
(quote or {} for quote in quotes.values()), (quote or {} for quote in quotes.values()),
index=quotes.keys(), index=quotes.keys(),