Pandas resample dataframe
I have a resampling (downsampling) problem that should be straightforward
to do but I'm not able!! Here is a simplified example:
df:
Time A
0 0.01591 0.108929
1 0.27973 0.411764
2 0.55044 0.064253
3 0.81386 0.317394
4 1.07983 0.722707
5 1.35051 1.154193
6 1.61495 1.151492
7 1.88035 0.123389
8 2.15462 0.093583
9 2.41534 0.260944
10 2.67992 1.007564
11 2.95148 0.325353
12 3.21364 0.555593
13 3.47980 0.740621
15 4.01519 1.619669
16 4.28679 0.477371
17 4.55482 0.432049
18 4.81570 0.194224
19 5.07992 0.331936
The Time column is in seconds. I would like to make the Time the index and
downsample the dataframe to 1s. Help please?
No comments:
Post a Comment