Create a new column in Pandas Dataframe based on the 'NaN' values in another column What is the most efficient way to create a new column based off of nan values in a separate column (considering the dataframe is very large)

1 2 3
4 5 NaN
7 8 9
3 2 NaN
5 6 NaN


Should give

1 2 3    0
4 5 NaN  1
7 8 9    0
3 2 NaN  1
5 6 NaN  1


EDIT:

What if it were based on 2 columns? Like:

1 2   3    0
4 NaN 1    1
7 8   9    0
3 2   NaN  1
5 NaN 2    1
Try this -

Column is your column with NaN values and column B is the new column 

df['B'] = df['A'].isnull()*1