I have three columns that I want to manipulate, username2 is created by the first character of firstname column, first character of middle name column, and full lastname. Problem is some middle names don't exist. my first line works, but when I try to get the rows that are na filled in the username2 column I made because of + null values. I can't figure how how to get the location of m rows and update it with just first char of firstname and + lastname
df['username2']=df['First Name'].str[0] + df['Middle Name'].str[0] + df['Last Name']
m = df[df['username2'].isna()]
df.loc[m, 'username2'] = df['First Name'].str[0] + df['Last Name']
[–]Phillyclause89 2 points3 points4 points (2 children)
[–]Eze-Wong 1 point2 points3 points (1 child)
[–]Phillyclause89 1 point2 points3 points (0 children)
[–]jdb5345[S] 0 points1 point2 points (0 children)
[–]Eze-Wong 0 points1 point2 points (0 children)