Reputation: 1675
I have a few columns in the Pandas dataframe which are sparsely populated, and I wish to modify their respective values to, whether they are filled or not.
For instance, my dataframe is:
A B C D
0 8 8
1 9 4 4
2 5 3 8
3 4 1
I want it to be :
A B C D
0 8 F F 8
1 9 T F 4
2 5 F T 8
3 4 F F 1
F = False, T= True
Running pandas.isnull(df['B'])
returns a new series with boolean values, how do I update it efficiently in the original dataframe?
Upvotes: 0
Views: 119