Answers for "check if any column is null pandas"

3

find nan values in a column pandas

df.isnull().values.any()
Posted by: Guest on July-23-2020
3

find nan values in a column pandas

df['your column name'].isnull().sum()
Posted by: Guest on July-23-2020
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 "check if any column is null pandas"

Python Answers by Framework

Browse Popular Code Answers by Language