pydpeet.add_cumulative_energy#
- pydpeet.add_cumulative_energy(df, config=None, verbose=True)[source]#
Calculates cumulative energy [Wh] and absolute cumulative energy [Wh] from ‘Test_Time[s]’ and ‘Power[W]’ columns.
Parameters: - df (pandas.DataFrame): DataFrame containing ‘Test_Time[s]’ and ‘Power[W]’ columns - cumu_energy_method (CumulativeEnergyMethod): Method to use for cumulative energy calculation - config (BatteryConfig): Config object containing max and min voltage values
Returns: - pandas.DataFrame: DataFrame with added ‘CumulativeEnergy[Wh]’ and ‘AbsoluteCumulativeEnergy[Wh]’ columns
Notes: The ‘CumulativeEnergy[Wh]’ column represents the cumulative energy (in Wh) with sign (i.e., charge + / discharge -) The ‘AbsoluteCumulativeEnergy[Wh]’ column represents the cumulative absolute energy (in Wh)