Feb-12-2021, 06:25 AM
The below yahoo_fin script will export 2 ticker lists to 2 csv files.
Question: how do I need to script so that the data is combined and exported to 1 csv file?
Question: how do I need to script so that the data is combined and exported to 1 csv file?
import pandas as pd from yahoo_fin import stock_info as si data1 = si.tickers_nasdaq() data2 = si.tickers_other() df = pd.DataFrame(data1) df2.to_csv(r'NASDAQ_tickers.csv') df = pd.DataFrame(data2) df2.to_csv(r'Other_tickers.csv')