I have this following dataframe:
And i have this following list:
and i want to replace the series value of team_stat['First Half']['W'] to the list value of first_half_win_result
I have this following dataframe:
And i have this following list:
and i want to replace the series value of team_stat['First Half']['W'] to the list value of first_half_win_result
Try the following code, it would convert list to series
for pandas
team_stat['First Half']['W'] = pd.Series(first_half_win_result)
well i find the solution:
team_stat = team_stat.transpose()
team_stat.loc['First Half', 'W'] = first_half_win_result
team_stat = team_stat.transpose()