This is my dataset :
offerid category countty browserid devid click
0 887235 17714 e Firefox NaN 0
1 178235 21407 b Mozilla Desktop 0
2 518539 25085 a Edge NaN 0
3 390352 40339 c Firefox Mobile 0
4 472937 12052 d Mozilla Desktop 0
For everytime Firefox occurs in 'browserid' column, I need to fill the 'NaN' in the 'devid' column with 'Mobile'. This is the code I've written for achieving this.
if data['browserid'] == 'Firefox' :
data['devid'].fillna('Mobile', inplace=True)
I am facing the following error :
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
Any help would be aprerciated!