title: How to compare pandas DataFrame against None in Python?
body: <p>How do I compare a pandas DataFrame with <code>None</code>? I have a constructor that takes one of a <code>parameter_file</code> or a <code>pandas_df</code> but never both. </p>
  
  <pre><code>def __init__(self,copasi_file,row_to_insert=0,parameter_file=None,pandas_df=None):
      self.copasi_file=copasi_file
      self.parameter_file=parameter_file
      self.pandas_df=pandas_df      
  </code></pre>
  
  <p>However, when I later try to compare the <code>pandas_df</code> against <code>None</code>, (i.e. when <code>self.pandas_df</code> actually contains a pandas dataframe):</p>
  
  <pre><code>    if self.pandas_df!=None:
          print 'Do stuff'
  </code></pre>
  
  <p>I get the following TypeError: </p>
  
  <pre><code>  File "C:\Anaconda1\lib\site-packages\pandas\core\internals.py", line 885, in eval
      % repr(other))
  
  TypeError: Could not compare [None] with block values
  </code></pre>