Games Home Away
Team 1 vs. Team 2 Team 1 Team 2
Team 1 @ Team 2 Team 2 Team 1
I have a column called Games and want to split it into two new columns label as Home and Away.
For the @ I used df['Away'] = df['Games'].map(lambda x: x.split('@')[0])
and it works. But I tried using df['Away'] = df['Games'].map(lambda x: x.split('vs.')[1])
it didn't work.
What am I missing??