Answers for "how to check if there is a data in a column or not python"

4

check if column exists in dataframe

if 'A' in df.columns:
Posted by: Guest on May-21-2020
-1

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 "how to check if there is a data in a column or not python"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language