Build columns only for dataframe output
parent
bcaef70612
commit
9b34aac0fd
|
@ -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(),
|
||||||
|
|
Loading…
Reference in New Issue