<blockquote>
<ol>
<li>No aggregation affection, but you will lose the time part.</li>
<li>No, mostly you can access the time part by <code>.dt</code> <a href="http://pandas.pydata.org/pandas-docs/stable/basics.html#dt-accessor" rel="nofollow">accessor</a>.</li>
</ol>
</blockquote>
<pre><code>import pandas as pd
df = pd.read_csv('MyTest.csv', parse_dates=[['TranDate', 'TranTime']])
print df
TranDate_TranTime TranID TranAmt
0 2016-04-27 02:18:00 A123456 9999.53
1 2016-04-26 02:48:00 B123457 26070.33
2 2016-04-25 03:18:00 C123458 13779.56
3 2016-04-24 03:18:00 A123459 18157.26
4 2016-04-23 04:18:00 B123460 215868.15
5 2016-04-22 04:18:00 C123461 23695.25
6 2016-04-21 05:18:00 A123462 57.00
7 2016-04-20 05:18:00 B123463 64594.24
8 2016-04-19 06:18:00 C123464 47890.91
9 2016-04-27 06:18:00 A123465 14119.74
10 2016-04-26 07:18:00 B123466 2649.60
11 2016-04-25 07:18:00 C123467 16757.38
12 2016-04-24 08:18:00 A123468 8864.78
13 2016-04-23 08:18:00 B123469 26254.69
14 2016-04-22 09:18:00 C123470 13206.98
15 2016-04-21 09:18:00 A123471 15872.45
16 2016-04-20 10:18:00 B123472 197621.18
17 2016-04-19 10:18:00 C123473 21048.72
</code></pre>
<p>使用嵌套括号<code>parse_dates=[[]]</code>尽可能将日期/时间作为一列进行解析和管理。在</p>
^{pr2}$
<p>得到你想要的东西。在</p>
<p>您仍然可以在<a href="http://pandas.pydata.org/pandas-docs/version/0.18.0/generated/pandas.DataFrame.resample.html" rel="nofollow">resampling</a>之后进行groupby,如下所示。在</p>
<pre><code>df2 = df.set_index('TranDate_TranTime').resample('60s').sum().dropna()
print df2
TranAmt
TranDate_TranTime
2016-04-19 06:18:00 47890.91
2016-04-19 10:18:00 21048.72
2016-04-20 05:18:00 64594.24
2016-04-20 10:18:00 197621.18
2016-04-21 05:18:00 57.00
2016-04-21 09:18:00 15872.45
2016-04-22 04:18:00 23695.25
2016-04-22 09:18:00 13206.98
2016-04-23 04:18:00 215868.15
2016-04-23 08:18:00 26254.69
2016-04-24 03:18:00 18157.26
2016-04-24 08:18:00 8864.78
2016-04-25 03:18:00 13779.56
2016-04-25 07:18:00 16757.38
2016-04-26 02:48:00 26070.33
2016-04-26 07:18:00 2649.60
2016-04-27 02:18:00 9999.53
2016-04-27 06:18:00 14119.74
print df2.groupby(df2.index.day).sum()
TranAmt
19 68939.63
20 262215.42
21 15929.45
22 36902.23
23 242122.84
24 27022.04
25 30536.94
26 28719.93
27 24119.27
</code></pre>