I would like to filter my data so that I only get the symbol, close and sector.
I tried using the code below but I get an error that 'list is not callable' .
Also, do note that iexfinance uses filter_, as filter is a reserved word in Python
print(losers(filter_=['symbol','close']))
Any help will be appreciated. Thanks guys!
You get a list from
get_market_losers()
that you need to iterate over:Printout:
To get all your data in a dataframe use this (the columns are already named according to the IEX features):
Printout:
Filter from the dataframe directly:
Printout: