This is to combine the series into dataframe and then finally here will generate a list of 0, if use data reset_index it is () to handle this column o column name as the level0, below is
After incorporating data5 and data6, there are two column content data sets, a country's name, one is the corresponding number of main/away wins (the home team and the away team), I want to keep every data index column is the country, such as a country but there is no home winning away win also keep
First question was more out of the level0 column drop remove not used, the tip does not exist this column name, how to deal with can delete, or at the beginning there is an error in the sum of the series to the dataframe?
The second question is how to combine the two data sets, finally generated three columns, country, home and away,
CodePudding user response:
Hair sample data, hair code, the resultsCodePudding user response:
Level0 don't delete, because that is the index, see if we can drop with reset_index parameters=True outData. Reset_index (level=None, the drop=True, inplace=True,
Col_level=0, col_fill="")