Data Cleaning Question

Screen Link:

My Code:
v_null = (mvc[v_col].isnull() & mvc[c_col].notnull()).sum()
c_null = (mvc[c_col].isnull() & mvc[v_col].notnull()).sum()


``
Trying to understand what is the & doing I'm lost. 


Hi @infinetw ,

In the first line of your code, we’re counting the number of rows in the mvc dataframe, where both the column v_col is null and the column c_col is not null.

In the second line - just the opposite, we’re counting the number of rows in the mvc dataframe, where both the column v_col is not null and the column c_col is null.

1 Like