python - Create multiple dataframes in loop -
i have list, each entry being company name
companies = ['aa', 'aapl', 'ba', ....., 'yhoo']
i want create new dataframe each entry in list.
something like
(pseudocode)
for c in companies: c = pd.dataframe()
i have searched way can't find it. ideas?
you can (although use exec
extreme caution if going public-facing code)
for c in companies: exec('{} = pd.dataframe()'.format(c))
Comments
Post a Comment