Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #53394 > unrolled thread

Not getting my head around pandas

Started byRoy Smith <roy@panix.com>
First post2013-08-31 21:23 -0400
Last post2013-08-31 21:23 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Not getting my head around pandas Roy Smith <roy@panix.com> - 2013-08-31 21:23 -0400

#53394 — Not getting my head around pandas

FromRoy Smith <roy@panix.com>
Date2013-08-31 21:23 -0400
SubjectNot getting my head around pandas
Message-ID<roy-A6E29C.21230031082013@news.panix.com>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web