Answers for "make prediction if a column contains null value pandas"

2

show rows with a null value pandas

df1 = df[df.isna().any(axis=1)]
Posted by: Guest on March-19-2021
0

python if column is null then

df['real_lastName'] = np.where(df['LastName'].isnull(), df['Middle'], df['LastName'] )

print (df)
  FirstName Middle LastName real_lastName
0       Tom     Ju      NaN            Ju
1      Kity    NaN      Rob           Rob
Posted by: Guest on June-30-2020

Code answers related to "make prediction if a column contains null value pandas"

Python Answers by Framework

Browse Popular Code Answers by Language