Created
September 23, 2021 16:48
-
-
Save SajidLhessani/1d4385ec41c1a1fbf02a8047ca79d277 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Import packages | |
import pandas as pd | |
import numpy as np | |
import yfinance as yf | |
#Scrap the data | |
#data = pd.read_html('https://indiancompanies.in/listed-companies-in-nse-with-symbol/')[0] | |
data = pd.read_html('https://en.wikipedia.org/wiki/List_of_S%26P_500_companies')[0]["Symbol"] | |
data | |
#Convert to list | |
sp = data.to_list() | |
#Import data | |
df = yf.download(sp,period = "3d",interval="15m") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment