Efficient way to find null values in a dataframe
<pre><code>import pandas as pd
import numpy as np

df = pd.read_csv ('file',low_memory=False)

df_null = df.isnull()
mask = (df_null == True)
i, j = np.where(mask)
print (list(zip(df_null.columns[j], df['Column1'][i])))
</code></pre>

<p>This is what I currently have. Essentially, I've created two dataframes and from there using the index of the null value, picked the corresponding value in Column A.</p>

<p>The ask is if there is a more efficient and faster way of doing this using Dataframes, which I admit, I don't know too well.</p>

<p>A routine that I normally use in pandas to identify null counts by columns is the following:</p>

<pre class="lang-py prettyprint-override"><code>import pandas as pd

df = pd.read_csv("test.csv")

null_counts = df.isnull().sum()
null_counts[null_counts &gt; 0].sort_values(ascending=False)
</code></pre>

<p>This will print the columns that have null values along with sorting each column by the number of null values that it has. </p>

<p>Example output:
</p>

<pre><code>PoolQC          1453
MiscFeature     1406
Alley           1369
Fence           1179
FireplaceQu      690
LotFrontage      259
GarageYrBlt       81
GarageType        81
GarageFinish      81
GarageQual        81
GarageCond        81
BsmtFinType2      38
BsmtExposure      38
BsmtFinType1      37
BsmtCond          37
BsmtQual          37
MasVnrArea         8
MasVnrType         8
Electrical         1
dtype: int64
</code></pre>

python pandas numpy