title: Usage of str.contains() applied to pandas data frame
body: <p>I am new to Python and Jupyter Notebook and I am currently following this tutorial: <a href="https://www.dataquest.io/blog/jupyter-notebook-tutorial/" rel="nofollow noreferrer">https://www.dataquest.io/blog/jupyter-notebook-tutorial/</a>. So far I've imported the pandas library and a couple other things, and I've made a data frame 'df' which is just a CSV file of company profit and revenue data. I'm having trouble understanding the following line of the tutorial:</p>
  
  <pre><code>non_numberic_profits = df.profit.str.contains('[^0-9.-]')
  </code></pre>
  
  <p>I understand the point of what the tutorial is doing: identifying all the companies whose profit variable contains a string instead of a number. But I don't understand the point of [^0-9.-] and how the above function actually works.</p>
  
  <p>My full code is below. Thanks.</p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  import seaborn as sns
  sns.set(style="darkgrid")
  
  df = pd.read_csv('fortune500.csv')
  df.columns = ['year', 'rank', 'company', 'revenue', 'profit']
  non_numberic_profits = df.profit.str.contains('[^0-9.-]')
  df.loc[non_numberic_profits].head()
  </code></pre>