goldencheetahlib/client.py
def _request_activity_list(self, athlete):
        """Actually do the request for activity list
        This call is slow and therefore this method is memory cached.

        Keyword arguments:
        athlete -- Full name of athlete
        """
        response = self._get_request(self._athlete_endpoint(athlete))
        response_buffer = StringIO(response.text)

        activity_list = pd.read_csv(
            filepath_or_buffer=response_buffer,
            parse_dates={'datetime': ['date', 'time']},
            sep=',\s*',
            engine='python'
        )
        activity_list.rename(columns=lambda x: x.lower(), inplace=True)
        activity_list.rename(
            columns=lambda x: '_' + x if x[0].isdigit() else x, inplace=True)

        activity_list['has_hr'] = activity_list.average_heart_rate.map(bool)
        activity_list['has_spd'] = activity_list.average_speed.map(bool)
        activity_list['has_pwr'] = activity_list.average_power.map(bool)
        activity_list['has_cad'] = activity_list.average_heart_rate.map(bool)
        activity_list['data'] = pd.Series(dtype=np.dtype("object"))
        return activity_list
def _request_activity_list(self, athlete):
        response = self._get_request(self._athlete_endpoint(athlete))
        response_buffer = StringIO(response.text)

        activity_list = pd.read_csv(
            filepath_or_buffer=response_buffer,
            parse_dates={'datetime': ['date', 'time']},
            sep=',\s*',
            engine='python'
        )
        activity_list.rename(columns=lambda x: x.lower(), inplace=True)
        activity_list.rename(
            columns=lambda x: '_' + x if x[0].isdigit() else x, inplace=True)

        activity_list['has_hr'] = activity_list.average_heart_rate.map(bool)
        activity_list['has_spd'] = activity_list.average_speed.map(bool)
        activity_list['has_pwr'] = activity_list.average_power.map(bool)
        activity_list['has_cad'] = activity_list.average_heart_rate.map(bool)
        activity_list['data'] = pd.Series(dtype=np.dtype("object"))
        return activity_list
def _request_activity_list ( self , athlete ) : response = self . _get_request ( self . _athlete_endpoint ( athlete ) ) response_buffer = StringIO ( response . text ) activity_list = pd . read_csv ( filepath_or_buffer = response_buffer , parse_dates = { 'datetime' : [ 'date' , 'time' ] } , sep = ',\s*' , engine = 'python' ) activity_list . rename ( columns = lambda x : x . lower ( ) , inplace = True ) activity_list . rename ( columns = lambda x : '_' + x if x [ 0 ] . isdigit ( ) else x , inplace = True ) activity_list [ 'has_hr' ] = activity_list . average_heart_rate . map ( bool ) activity_list [ 'has_spd' ] = activity_list . average_speed . map ( bool ) activity_list [ 'has_pwr' ] = activity_list . average_power . map ( bool ) activity_list [ 'has_cad' ] = activity_list . average_heart_rate . map ( bool ) activity_list [ 'data' ] = pd . Series ( dtype = np . dtype ( "object" ) ) return activity_list
Actually do the request for activity list
        This call is slow and therefore this method is memory cached.

        Keyword arguments:
        athlete -- Full name of athlete
Actually do the request for activity list This call is slow and therefore this method is memory cached .