title: How to write a function to find all rows where value in a column is null when values in dependent columns are not null
body: <pre class="lang-py prettyprint-override"><code>def check_correlated_column_values(df,column,dependent_column_list):
          result = df.loc[(df[column].isnull()) &amp; (pd.notnull(df[dependent_column_list[0]])) &amp; (pd.notnull(df[dependent_column_list[1]])) &amp; (pd.notnull(df[dependent_column_list[2]]))]
          return (result)
  </code></pre>
  
  <p>This <code>dependent_column_list</code> is dynamic and can change for a particular column.</p>
  
  <p>Example: A dataframe has 3 columns, ManagerName, ManagerPhone and ManagerEmail, I want to write a generic function that finds all rows where ManagerName is null but ManagerPhone and ManagerEmail column values are NOT NULLs. </p>
  
  <p>In the above function context, <code>column='ManagerName'</code>, <code>dependent_column_list=['ManagerPhone', ManagerEmail']</code>. Above function is working only when there are 3 columns in dependent list, want to make it generic so that it can handle any number of dynamic changes in that list.</p>
  
  <p>Thanks!!!</p>