Getting index from resample in Pandas
<p>I have a time series data frame in Python with every second frequency. I am trying to aggregate the data to get the maximum value of <code>Speed</code> at each minute. I am using this code:</p>

<pre><code>df = pd.DataFrame({ 'Speed' : [],
                  'Acceleration' : []
            })
rng = pd.date_range('1/1/2011', periods=72, freq='s')
df['Speed'] = np.random.randn(len(rng))
df['Acceleration'] = np.random.randn(len(rng))
df = df.set_index(rng)
df['Acceleration'].resample("1Min").max()
</code></pre>

<p>However, I have another column <code>Speed</code> and I am interested to get the associated value of it to the maximum <code>Acceleration</code> at each minute. For example, imagine the highest <code>Acceleration</code> for <code>13:15</code> happened at 13:15:10 and it was <code>1.2</code> m/s^2. At the same second, the speed was <code>5</code> m/s. I'd like to get that speed in addition to the maximum Acceleration. Thanks.</p>