DataFrame Accessor

pandas_xyz provides a separate namespace with DataFrame that only applies to DataFrames structured as records of data along a route, like that contained in activity files (FIT, GPX, TCX).

pandas.DataFrame.xyz can be used to access the values of the dataframe as activity records and return several properties. These can be accessed like DataFrame.xyz.<property>.

Position methods

pandas.DataFrame.xyz.ds_from_xy(**kwargs)

Calculate point-to-point displacements from GPS coordinates.

pandas.DataFrame.xyz.ds_from_s(**kwargs)

Calculate point-to-point displacements from cumulative distances.

pandas.DataFrame.xyz.s_from_ds(**kwargs)

Calculate cumulative distances from point-to-point displacements.

pandas.DataFrame.xyz.s_from_xy(**kwargs)

Calculate cumulative distances from GPS coordinates.

pandas.DataFrame.xyz.s_from_v(**kwargs)

Calculate cumulative distances from speed

pandas.DataFrame.xyz.v_from_ds(**kwargs)

Calculate speed from point-to-point displacements.

pandas.DataFrame.xyz.v_from_s(**kwargs)

Calculate speed from cumulative distances.

pandas.DataFrame.xyz.reduced_point_index(...)

Detect GPS coordinates that are too close together.

Elevation methods

pandas.DataFrame.xyz.z_filter_threshold(**kwargs)

Filter elevation coordinates by ignoring changes smaller than some threshold value.

pandas.DataFrame.xyz.z_smooth_time(**kwargs)

Smooths noisy elevation time series.

pandas.DataFrame.xyz.z_smooth_distance(**kwargs)

Like z_smooth_time(), but sampled over distance instead of time.

pandas.DataFrame.xyz.z_flatten(**kwargs)

Return a series of elevation coordinates with no changes in elevation.

pandas.DataFrame.xyz.z_gain_naive(**kwargs)

Calculate elevation gain (scalar).

pandas.DataFrame.xyz.z_gain_threshold(**kwargs)

Conservatively calculate elevation gain from a series of coordinates.