stochazesthai
stochazesthai

Reputation: 697

time-series analysis in python

I'm new to Python and I'm trying to analyze a time series. I have a Series indexed with dates, and I would like to split my time series to see e.g. how many $t$ appeared between 16 and 17, how many between 17 and 18, and so on.

How can I do that for minutes, days, weeks, months? Basically I would like to zoom in at different time lengths.

The ideal solution would be something like the .groupby() method, that would allow to easily see how my time series behaves in different periods.

                     t
2015-05-27 16:37:08  1
2015-05-27 16:37:12  1
2015-05-27 16:37:48  1
2015-05-27 16:37:49  1
2015-05-27 16:38:00  1

Upvotes: 0

Views: 838

Answers (1)

Andrzej Pronobis
Andrzej Pronobis

Reputation: 36086

Check out Pandas. Pandas provides data structures and data analysis tools for time series and will provide exactly the kind of functionality you are looking for. Look into this page of documentation which focuses on time series: http://pandas.pydata.org/pandas-docs/stable/timeseries.html

Upvotes: 4

Related Questions