I have a dataframe in which I have these column names
- 'team1',
- 'team2',
- 'city',
- 'date'.
What I want to do is to assign value of 'city' as 'dubai' when certain condition meets(which I am defining using mask).
This is what I am doing exactly:
matches[((matches['team1']=='mi') & (matches['team2']=='rcb') & (matches['date']=='2014-04-19')),'city']='Dubai'
When all the above condition meets I want to change value in 'city'(which is null now) to 'Dubai'
The problem which arises:
'Series' objects are mutable, thus they cannot be hashed
How can I do this?