pandas join 2 sets of columns

pd.concat([data[['Date','HomeTeam']].rename(columns = {'HomeTeam':'Team'}),
data[['Date','AwayTeam']].rename(columns = {'AwayTeam':'Team'})],ignore_index=True)
  • pd.concat
    • data[['data','HomeTeam']
    • .rename(columns={'HomeTeam':'Team'}
  • join with
  • data[['data','AwayTeam']
    • .rename(columns={'AwayTeam':'Team'}
  • ignore_index=True