title: Making lists from pandas.dataframe.iloc slice doesn't work while pandas.dataframe.values slice work
body: <p>I want to agregate columns from a dataframe into a new columns</p>
  
  <p>So I used:</p>
  
  <pre><code>newdataframe["agregate1"]=list(df.iloc[:,0:4])
  </code></pre>
  
  <p>but it doesn't work.
  It returns an ["intensity_x"] list (with x as column index), these strings being the names of my dataframe columns.</p>
  
  <p>While</p>
  
  <pre><code>newdataframe["agregate1"]=list(df.iloc[0,0:4])
  </code></pre>
  
  <p>will return data such as   </p>
  
  <p>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2920000000.0, 2830000000.0, 3030000000.0, 0.0, 2980000000.0, 3000000000.0].  </p>
  
  <p>It is actually important since I can't retrieve correctly my data and it seems like a bug, or I am missing something important.</p>
  
  <p>By reading:
  <a href="https://stackoverflow.com/questions/26779972/pack-dataframe-columns-to-list-in-pandas">pack dataframe columns to list in pandas</a></p>
  
  <p>I circumvented the problem by using df.values instead of iloc, still I don't understand what is the problem with using "whole slices", only getting headers instead. This is strange. Thanks</p>