1

Have DataFrame like: columns

['team_1_player1', 'team_1_player2', 'team_2_player1', 'team_2_player2']

Players represented by their ID. like

[1, 2, 3, 4]

I whant to make DataFrame with this columns

['team_1_id_1', 'team_2_id_1', 'team_1_id_2', 'team_2_id_2', 'team_1_id_3', 'team_2_id_3', 'team_1_id_4', 'team_2_id_4']

iGero
  • 383
  • 1
  • 3
  • 6
  • 1
    https://stackoverflow.com/questions/24109779/running-get-dummies-on-several-dataframe-columns does this answer your question? – TH14 Apr 25 '20 at 11:43
  • @TH14 Thanks. it works! – iGero Apr 25 '20 at 20:36
  • https://stackoverflow.com/questions/24109779/running-get-dummies-on-several-dataframe-columns – iGero Apr 25 '20 at 20:37
  • Voting to close as duplicate of the linked question that worked. [Running get\_dummies on several DataFrame columns?](https://stackoverflow.com/questions/24109779/running-get-dummies-on-several-dataframe-columns) – Shaido Apr 28 '20 at 07:51

0 Answers0