title: How to Convert Pandas Dataframe to Single List
body: <p>Suppose I have a dataframe:</p>
  
  <pre><code>    col1    col2    col3
  0    1       5       2
  1    7       13
  2    9       1
  3            7
  </code></pre>
  
  <p>How do I convert to a single list such as:</p>
  
  <pre><code>[1, 7, 9, 5, 13, 1, 7]
  </code></pre>
  
  <p>I have tried:</p>
  
  <pre><code>df.values.tolist()
  </code></pre>
  
  <p>However this returns a list of lists rather than a single list:</p>
  
  <pre><code>[[1.0, 5.0, 2.0], [7.0, 13.0, nan], [9.0, 1.0, nan], [nan, 7.0, nan]]
  </code></pre>
  
  <p>Note the dataframe will contain an unknown number of columns. The order of the values is not important so long as the list contains all values in the dataframe.</p>
  
  <p>I imagine I could write a function to unpack the values, however I'm wondering if there is a simple built-in way of converting a dataframe to a series/list?</p>