sksports.io.bikeread

sksports.io.bikeread(filename, drop_nan=None)[source][source]

Read power data file.

Read more in the User Guide.

Parameters:
filename : str

Path to the file to read.

drop_nan : str {‘columns’, ‘rows’, ‘both’} or None

Either to remove the columns/rows containing NaN values. By default, all data will be kept.

Returns:
data : DataFrame

Power data and time data.

Examples

>>> from sksports.datasets import load_fit
>>> from sksports.io import bikeread
>>> activity = bikeread(load_fit()[0], drop_nan='columns')
>>> activity.head() 
                     elevation  cadence  distance  power  speed
2014-05-07 12:26:22       64.8     45.0      3.05  256.0  3.036
2014-05-07 12:26:23       64.8     42.0      6.09  185.0  3.053
2014-05-07 12:26:24       64.8     44.0      9.09  343.0  3.004
2014-05-07 12:26:25       64.8     45.0     11.94  344.0  2.846
2014-05-07 12:26:26       65.8     48.0     15.03  389.0  3.088