title: How to get the first and last values from the dataframe column using a function
body: <p>I need to get the first value and last values for the following using a function similar to the way I'm getting the <code>max()</code> and <code>min()</code> values from a Pandas DF column.  So this part of my code works perfectly to give me the max and min:</p>
  
  <pre><code>day_high = day_session['High'].rolling(window=1,freq='D').max()
  day_low = day_session['Low'].rolling(window=1,freq='D').min()
  </code></pre>
  
  <p>How do I get the first and last values respectively here using a function?</p>
  
  <p><code>day_open = day_session.Open.rolling(window=1,freq='D').</code>? (what is the 'first' function?)</p>
  
  <p><code>day_close = day_session.Last.rolling(window=1,freq='D').</code>? (what is the 'last' function?)</p>
  
  <p>I already tried <code>.first()</code> and this gives error output '<code>Rolling' object has no attribute 'first'</code> and same for <code>.last()</code> </p>
  
  <p>This is an example of the data Im using:</p>
  
  <pre><code>data['Last']
  Out[96]:
  Timestamp
  2013-03-07 09:30:00    1440.00
  2013-03-07 09:31:00    1439.75
  2013-03-07 09:32:00    1440.50
  2013-03-07 09:33:00    1441.00
  2013-03-07 09:34:00    1441.50
  2013-03-07 09:35:00    1441.75
  2013-03-07 09:36:00    1440.75
  2013-03-07 09:37:00    1440.50
  2013-03-07 09:38:00    1440.75
  2013-03-07 09:39:00    1440.00
  </code></pre>
  
  <p>This code is used for the rolling window and works fine for the max() Min() above:</p>
  
  <pre><code>daystart = '9:30'
  dayend = '16:14:59'
  
  day_session = data.between_time(daystart,dayend, include_start=True, include_end=True)
  </code></pre>
  
  <p>I am using concat to utilise this data with other series data in a df called <code>all_vals</code></p>
  
  <pre><code>all_vals = pd.concat([day_open,day_close,day_high,day_low,day_range,IB_high,IB_low,IB_Range,upper_quartile,lower_quartile,end_session_high,end_session_low], axis=1) 
  </code></pre>
  
  <p>thanks</p>