title: Returning unique values in .csv and unique strings in python+pandas
body: <p>my question is very similar to here: <a href="https://stackoverflow.com/questions/20084382/unique-values-in-a-pandas-dataframe">Find unique values in a Pandas dataframe, irrespective of row or column location</a></p>
  
  <p>I am very new to coding, so I apologize for the cringing in advance.</p>
  
  <p>I have a .csv file which I open as a pandas dataframe, and would like to be able to return unique values across the entire dataframe, as well as all unique strings.</p>
  
  <p>I have tried:</p>
  
  <pre><code>for row in df:
      pd.unique(df.values.ravel())
  </code></pre>
  
  <p>This fails to iterate through rows. </p>
  
  <p>The following code prints what I want:</p>
  
  <pre><code>  for index, row in df.iterrows():
          if isinstance(row, object):
              print('%s\n%s' % (index, row))
  </code></pre>
  
  <p>However, trying to place these values into a previously defined set (myset = set()) fails when I hit a blank column (NoneType error):</p>
  
  <pre><code>for index, row in df.iterrows():
      if isinstance(row, object):
          myset.update(print('%s\n%s' % (index, row)))
  </code></pre>
  
  <p>I get closest to what I was when I try the following:</p>
  
  <pre><code> for index, row in df.iterrows():
          if isinstance(row, object):
              myset.update('%s\n%s' % (index, row))
  </code></pre>
  
  <p>However, my set prints out a list of characters rather than the strings/floats/values that appear on my screen when I print above.</p>
  
  <p>Someone please help point out where I fail miserably at this task. Thanks!</p>