Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53394
| From | Roy Smith <roy@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Not getting my head around pandas |
| Date | 2013-08-31 21:23 -0400 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <roy-A6E29C.21230031082013@news.panix.com> (permalink) |
I've got a pandas DataFrame that looks like:
<class 'pandas.core.frame.DataFrame'>
Int64Index: 12960 entries, 0 to 12959
Data columns (total 2 columns):
date 12960 non-null values
ms 12960 non-null values
dtypes: datetime64[ns](1), float64(1)
date ms
12955 2013-08-30 23:20:00 96.868491
12956 2013-08-30 23:30:00 96.857826
12957 2013-08-30 23:40:00 92.624406
12958 2013-08-30 23:50:00 85.402094
12959 2013-08-31 00:00:00 93.870912
This is samples taken every 10 minutes going back several months. I
want to find the mean and variance for all the points that happened at
the same time each day. In other words, I want to group by date.time().
I can certainly do this by pulling all the data out of the DataFrame and
working on it as normal Python data. But, I suspect there's some easy
way to do this in pandas and I'm just not seeing it.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Not getting my head around pandas Roy Smith <roy@panix.com> - 2013-08-31 21:23 -0400
csiph-web