There are 48 files that I am looking to read in from GitHub into Python and am looking to use a loop to do this. Is there a way to name the dataframe using the number from loop?
number = 1
while number < 48 :
gameweek[number] = pd.read_csv("https://raw.githubusercontent.com/vaastav/Fantasy-Premier-League/master/data/2019-20/gws/gw"+str(number)+".csv")
number = number+1
Open to any suggestions on how best to do this.
gameweek[number]is uninitialized variable, so initializegameweekto an empty list[](or empty dict `{}') before you use it. This has nothing to do with pandas or dataframes per se.