sksports.extraction
.activity_power_profile¶
-
sksports.extraction.
activity_power_profile
(activity, max_duration=None)[source][source]¶ Compute the power profile for an activity.
Read more in the User Guide.
Parameters: - activity : DataFrame
A pandas DataFrame with at least a
'power'
column and the indices are the information about time. The activity can be read withsksports.io.bikeread
.- max_duration : Timedelta, timedelta, np.timedelta64, int, or str, optional
The maximum duration for which the power-profile should be computed. By default, it will be computed for the duration of the activity. An integer represents seconds.
Returns: - power_profile : Series
A pandas Series containing the power-profile.
References
[1] Pinot, J., and F. Grappe. “The record power profile to assess performance in elite cyclists.” International journal of sports medicine 32.11 (2011): 839-844. Examples
>>> from sksports.datasets import load_fit >>> from sksports.io import bikeread >>> from sksports.extraction import activity_power_profile >>> power_profile = activity_power_profile(bikeread(load_fit()[0])) >>> power_profile.head() # doctest : +NORMALIZE_WHITESPACE cadence 00:00:01 78.000000 00:00:02 64.000000 00:00:03 62.666667 00:00:04 62.500000 00:00:05 64.400000 Name: 2014-05-07 12:26:22, dtype: float64