obtaining the min value of time_diff for a Pandas Dataframe
Sorry for the garbled question. in order to do a groupby for a timedelta value the best way is to do a pd.numeric on the 'timedelta value' and once the results are obtained we can again do a pd.to_timedelta on it.
I have a Pandas Dataframe which has a field txn['time_diff']
     Send_Agent  Pay_Agent           Send_Time            Pay_Time  score  \
0     AKC383903  AXX100000 2014-08-19 18:52:35 2015-05-01 22:08:39      1
1     AWA280699  AXX100000 2014-08-19 19:32:18 2015-05-01 17:12:32      1
2     ALI030170  ALI030170 2014-08-26 10:11:40 2015-05-01 22:20:09      1
3     AKC403474  AXX100000 2014-08-19 20:35:53 2015-05-01 21:27:12      1
4     AED002616  AED002616 2014-09-28 18:37:32 2015-05-01 14:06:17      1
5     ALI030170  ALI030170 2014-08-20 05:08:03 2015-05-01 21:29:43      1
6     ADA414187  ADA414187 2014-09-26 17:46:24 2015-05-01 21:37:51      1
7     AWA042396  AWA042396 2014-08-27 12:07:11 2015-05-01 17:39:31      1
8     AED002616  AED002616 2014-08-23 04:53:03 2015-05-01 13:33:12      1
9     ALA500685  AXX100000 2014-08-27 16:41:26 2015-05-01 19:01:52      1
10    AWA263407  AXX100000 2014-08-27 18:04:24 2015-05-01 10:39:14      1
11    ACH928457  ACH928457 2014-08-28 10:26:41 2015-05-01 11:55:59      1
             time_diff
0    255 days 03:16:04
1    254 days 21:40:14
2    248 days 12:08:29
3    255 days 00:51:19
4    214 days 19:28:45
5    254 days 16:21:40
6    217 days 03:51:27
7    247 days 05:32:20
8    251 days 08:40:09
9    247 days 02:20:26
10   246 days 16:34:50
11   246 days 01:29:18
txn['time_diff'].min() works fine. But txn['time_diff'].groupby(txn['Send_Agent']).min() gives me the output in seconds
Send_Agent
A03010016       86546000000000
A03020048       53056000000000
A10001087      113459000000000
A11120030      680136000000000
A11120074      787844000000000
A11120106     1478045000000000
A11120117     2505686000000000
A11120227      923508000000000
A11120294     1460320000000000
A11120304      970226000000000
A11120393     3787969000000000
A11120414     2499079000000000
A11120425       65753000000000
A11140016      782269000000000
But I want it in terms of days , hours , mins.
I did the following 
txn = txn.astype(str)
Time_diff_min = txn['time_diff'].groupby(txn['Send_Agent']).min()
The output I get is in the right format but is erroneous and is fetching the "first" value it finds for that "groupby"
In [15]: Time_diff_min = txn['time_diff'].groupby(txn['Send_Agent']).min()
In [16]: Time_diff_min
Out[16]:
Send_Agent
A03010016      1 days 00:02:26.000000000
A03020048      0 days 14:44:16.000000000
A10001087      1 days 07:30:59.000000000
A11120030     13 days 06:29:35.000000000
A11120074      9 days 02:50:44.000000000
A11120106     17 days 02:34:05.000000000
A11120117     29 days 00:01:26.000000000
A11120227     10 days 16:31:48.000000000
A11120294     16 days 21:38:40.000000000
A11120304     11 days 05:30:26.000000000
A11120393     43 days 20:12:49.000000000
A11120414     28 days 22:11:19.000000000
A11120425      0 days 18:15:53.000000000
A11140016      9 days 01:17:49.000000000
A11140104      0 days 15:33:06.000000000
A11140126      1 days 18:36:07.000000000
A11140214     23 days 02:30:07.000000000
Also 
 Time_diff_min = txn['time_diff']..min().groupby(txn['Send_Agent'])
throws an error that I cannot groupby on a timedelta