I am attempting to get a Non null value for the LastName, but I am receiving an error. How can I resolve this? p.s I have 20 millions rows.
dataframe:
FirstName Middle LastName
Tom Ju NaN
Kity NaN Rob
my attemp:
for row in df:
if row['LastName'].isnull() == True:
row['real_lastName'] = row['Middle']
else:
row['real_lastName'] = row['LastName']
i have the following error
TypeError: string indices must be integers