Python Forum
How to accumulate volume of time series
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to accumulate volume of time series
#1
Hello, I am working with a time series containing rain. the data looks like

intensity
0.1
0.2
0.1
0.1
0.0
0.0
0.2

And I want to be able to calculate the accumulated rain like this:
0.1
0.2+0.1
0.1+0.3
0.1+0.4
0.0+0.5
0.0+0.5
0.2+0.5

                    
for i in range(len(Needed_vol) - 1):
                        Needed_vol.loc[i + 1] = Needed_vol.loc[i] + Needed_vol.loc[i + 1]
So far I am doing it like this, and it works fine, it does, however, take too much time, as I am working with a file containing more than 10000 timestamps, so I would like to know if there is a way to do this more efficiently. It is important that it sums it up like the example
Hope someone can help ☺
Reply


Messages In This Thread
How to accumulate volume of time series - by amdi40 - Feb-14-2022, 11:10 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help: Conversion of Electricity Data into Time Series Data SmallGuy 3 1,281 Oct-04-2023, 03:31 PM
Last Post: deanhystad
  Time Series Production Process Problem Mzarour 1 2,167 Feb-28-2023, 12:25 PM
Last Post: get2sid
  reduce time series based on sum condition amdi40 0 1,130 Apr-06-2022, 09:09 AM
Last Post: amdi40
  Recommendations for ML libraries for time-series forecast AndreasPython 0 1,917 Jan-06-2021, 01:03 PM
Last Post: AndreasPython
  Time Series forecating with multiple independent variables Krychol88 1 1,912 Oct-23-2020, 08:11 AM
Last Post: DPaul
  how to handling time series data file with Python? aupres 4 3,042 Aug-10-2020, 12:40 PM
Last Post: MattKahn13
  Changing Time Series from Start to End of Month illmattic 0 1,903 Jul-16-2020, 10:49 AM
Last Post: illmattic
  HELP- DATA FRAME INTO TIME SERIES- BASIC bntayfur 0 1,780 Jul-11-2020, 09:04 PM
Last Post: bntayfur
  Differencing Time series and Inverse after Training donnertrud 0 4,148 May-27-2020, 06:11 AM
Last Post: donnertrud
  How can I convert time-series data in rows into column srvmig 0 2,110 Apr-11-2020, 05:40 AM
Last Post: srvmig

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020