Hello: I have the following code that gives me a count of the number of null values in a column:
df_null = df.columns[df.isnull().any()]
df[df_null].isnull().sum()
The result is an index with the column name and number of null values:
col1 10  
col2 20  
col3 30  
What I want to do is drop all the rows/records in columns that have less than 15 null values. I have gone through the columns manually and dropped the rows/records using the following:
df.dropna(subset=['col_name'], axis=0, inplace=True)
That works fine. But what I would like to do is automate the process so I don't have to manually go through each column and drop the null rows/records manually.
Thank you.


