runpandas.types.acessors.session._SessionAcessor#

class runpandas.types.acessors.session._SessionAcessor(session)#

Dataframe Accessor to compute the aggregated metrics from a MultiIndex runpandas.types.Activity object.

Raises

AttributeError – if it is not a runpandas.types.Activity instance or not have a pd.MultiIndex or not have the index levels of type pd.DateTimeIndex or pd.TimedeltaIndex.

__init__(session)#

Methods

__init__(session)

count()

Returns the total number of activities in the session.

distance([correct_distance, to_special_column])

Compute the distance per position and total distance acummulative over all the activities.

gradient([to_special_column])

Compute the gradient ratio over all the activities.

heart_zone(bins, labels, **kwargs)

Compute the heart zone (with the training zone labels for each heart rate record) over all the activities.

only_moving([threshold])

Impute the periods of inactivity, as such periods must be detected and ignored from the analysis for moving time, heart rate, speed, and power-based calculations for all the activities in the session.

pace([to_special_column])

Compute the pace (the time that it takes to cover distances in your activities) over all the activities.

speed([from_distances, to_special_column])

Compute the speed in meters over all the activities.

summarize()

Summarize the session of activities by returning a Dataframe of the aggregated main statistics.

vertical_speed([to_special_column])

Compute the vertical climbing speed (VAM) in meters over all the activities.