Skip to content

Instantly share code, notes, and snippets.

@samchaaa
Created December 20, 2020 08:27
Show Gist options
  • Save samchaaa/2fff31c69dbc2a0a423dc664ff5db35c to your computer and use it in GitHub Desktop.
Save samchaaa/2fff31c69dbc2a0a423dc664ff5db35c to your computer and use it in GitHub Desktop.
if data_path not in os.listdir():
os.mkdir(data_path)
# save as json
for ticker in tqdm(sp):
data = get_data(ticker, '2020-08-01', '2020-12-15')
with open('./{}/{}.json'.format(data_path, ticker), 'w') as j:
json.dump(data.to_json(), open('./{}/{}.json'.format(data_path, ticker), 'w'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment