I'm really stuck into this. I don't know how to make these 3 dataframes into one because they are inside an array or so. I really need your help.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
str = 'https://fbref.com/en/comps/Big5/{}/{}-Big-5-European-Leagues-Stats'
seasons = ["2017-2018", "2018-2019", "2019-2020"]
for season in seasons:
url = str.format(season, season)
league = pd.read_html(url)
league = league[0]
league["Season"] = season
print(type(league))
<class 'pandas.core.frame.DataFrame'>
<class 'pandas.core.frame.DataFrame'>
<class 'pandas.core.frame.DataFrame'>