title: Pandas Dataframe column Validation
body: <p>i have a pandas dataframe with 30 columnns and 4000 rows.</p>
  <p>for about 5 columns i need to validate that it meets data validation
  is there a way to say something like &quot;<code>if df.Gender contains any value thats not 'M' or 'F' then print error</code>&quot;</p>
  <p>or <code>if df.MaritalStatus contains a value thats not M, S, D then print error.</code></p>
  <p><a href="https://i.stack.imgur.com/oJpnJ.png" rel="nofollow noreferrer">sample of df</a></p>
  <p>anyone have any best way of applying the conditions?</p>
  <pre><code>df = pd.read_csv(&quot;C:/Users/ABV1234/Desktop/DailyReport.csv&quot;)
  </code></pre>
  <p>##if df.Gender contains value that is not in ['m', 'f'] print Error</p>