0

I have a problem when I try to import the historical data of each company in python. Here is my code :

import pandas as pd
import numpy as np
import requests
import pandas_datareader as web

import pandas_datareader as web
ticker = pd.read_csv("nasdaq_screener_1611015840705.csv")['Symbol']
df = pd.DataFrame

for symbol in ticker:
  df[symbol] = web.DataReader(symbol, data_source = 'yahoo', start = '2013-01-01', end = '2020-12-29')['Adj Close']

However, on the last line of code, I got an error :

picture of the error

My goal is to make something which looks like this :

picture here

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158

0 Answers0