I'm analysing a Apache log file and I have imported it in to a pandas dataframe.
'65.55.52.118 - - [30/May/2013:06:58:52 -0600] "GET /detailedAddVen.php?refId=7954&uId=2802 HTTP/1.1" 200 4514 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"'
My dataframe:

I want to group this in to sessions based on IP, Agent and Time difference (If the duration of time is greater than 30 mins it should be a new session).
It is easy to group the dataframe by IP and Agent but how to check this time difference?Hope the problem is clear.
sessions = df.groupby(['IP', 'Agent']).size()
UPDATE : df.index is like follows:
<class 'pandas.tseries.index.DatetimeIndex'>
[2013-05-30 06:00:41, ..., 2013-05-30 22:29:14]
Length: 31975, Freq: None, Timezone: None