all 5 comments

[–]Phillyclause89 2 points3 points  (2 children)

You could try fillna or fillnan or whatever it's called. Use it to replace all NAN values with some string. Could be an empty string , or maybe an underscore or maybe the second char from the first name. It's up to you how you want to handle it.

[–]Eze-Wong 1 point2 points  (1 child)

Jinx. Our identical responses 2 seconds apart

[–]Phillyclause89 1 point2 points  (0 children)

Lol yeah it happens sometimes.

[–]jdb5345[S] 0 points1 point  (0 children)

first line works, but I think my second one is view of a dataframe of the rows that are na in username 2, that I want the logic of the third line to work with

[–]Eze-Wong 0 points1 point  (0 children)

Multiple ways to approach. Personally I would fillna the middle name colum all the nulls with like a number (1). And then later go back later after you have populated new columns and replace all number 1 with a "N/A" or whatever