title: Pandas: How do I drop not null data?
body: <p>When I read csv from file, due to the error of the data file, sometimes there will be unnecessary column at the end, so I read them as </p>
  
  <pre><code>df = pd.read_csv(StringIO(all_data_file), skipinitialspace=True, sep=' ', error_bad_lines=False, names = ['stationID', .... ,'unknown'])
  </code></pre>
  
  <p>Later on I throw the data if the <code>unknow</code> has data </p>
  
  <pre><code># Drop if has too many field
  df = df[df['unknown'].isnull()]
  df.drop('unknown', axis=1, inplace=True)
  </code></pre>
  
  <p>The problem is that, it gives me error </p>
  
  <pre><code>SettingWithCopyWarning: 
  A value is trying to be set on a copy of a slice from a DataFrame
  </code></pre>
  
  <p>So I want to know, what is the proper approach for dropping the data?</p>