From 3b5d1019796f834e2a2af1b272e880b66c13be70 Mon Sep 17 00:00:00 2001 From: Jenna Vergeynst Date: Sat, 10 Mar 2018 13:33:54 +0100 Subject: [PATCH 1/7] DOC: seperate drop doc for series and dataframes --- pandas/core/frame.py | 122 +++++++++++++++++++++++++++++++++++++++++ pandas/core/generic.py | 69 +---------------------- pandas/core/series.py | 91 ++++++++++++++++++++++++++++++ 3 files changed, 215 insertions(+), 67 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index a66d00fff9714..d2b0da9c25088 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -3035,6 +3035,128 @@ def reindex_axis(self, labels, axis=0, method=None, level=None, copy=True, method=method, level=level, copy=copy, limit=limit, fill_value=fill_value) + def drop(self, labels=None, axis=0, index=None, columns=None, + level=None, inplace=False, errors='raise'): + """ + Drop rows or columns. + + Remove rows or columns by specifying label names and corresponding axis, + or by specifying directly index or column names. When using a + multi-index, labels on different levels can be removed by specifying + the level name or int. + + Parameters + ---------- + labels : single label or list-like + Index or column labels to drop. + axis : int or axis name, default 0 + Whether to drop labels from the index (0 / 'index') or + columns (1 / 'columns'). + index : None + Redundant for application on Series, but index can be used instead + of labels. + columns : None + Redundant for application on Series, but index can be used instead + of labels. + + .. versionadded:: 0.21.0 + level : int or level name, optional + For MultiIndex. + inplace : bool, default False + If True, do operation inplace and return None. + errors : {'ignore', 'raise'}, default 'raise' + If 'ignore', suppress error and existing labels are dropped. + + Returns + ------- + dropped : type of caller + + See Also + -------- + DataFrame.dropna : Return DataFrame with labels on given axis omitted + where (all or any) data are missing + DataFrame.drop_duplicates : Return DataFrame with duplicate rows removed, + optionally only considering certain columns + + Raises + ------ + KeyError + If none of the labels are found in the selected axis + + Examples + -------- + >>> df = pd.DataFrame(np.arange(12).reshape(3,4), + ... columns=['A', 'B', 'C', 'D']) + >>> df + A B C D + 0 0 1 2 3 + 1 4 5 6 7 + 2 8 9 10 11 + + Drop columns + + >>> df.drop(['B', 'C'], axis=1) + A D + 0 0 3 + 1 4 7 + 2 8 11 + + >>> df.drop(columns=['B', 'C']) + A D + 0 0 3 + 1 4 7 + 2 8 11 + + Drop a row by index + + >>> df.drop([0, 1]) + A B C D + 2 8 9 10 11 + + Drop columns and/or rows of MultiIndex + + >>> midx = pd.MultiIndex(levels=[['lama','cow','falcon'], + ... ['speed','weight','length']], + ... labels=[[0, 0, 0, 1, 1, 1, 2, 2, 2], + ... [0, 1, 2, 0, 1, 2, 0, 1, 2]]) + >>> df = pd.DataFrame(index=midx, columns=['big','small'], + ... data=[[45,30],[200,100],[1.5,1],[30,20],[250,150], + ... [1.5,0.8],[320,250],[1,0.8],[0.3,0.2]]) + >>> df + big small + lama speed 45.0 30.0 + weight 200.0 100.0 + length 1.5 1.0 + cow speed 30.0 20.0 + weight 250.0 150.0 + length 1.5 0.8 + falcon speed 320.0 250.0 + weight 1.0 0.8 + length 0.3 0.2 + + >>> df.drop(index='cow',columns='small') + big + lama speed 45.0 + weight 200.0 + length 1.5 + falcon speed 320.0 + weight 1.0 + length 0.3 + + >>> df.drop(index='length', level=1) + big small + lama speed 45.0 30.0 + weight 200.0 100.0 + cow speed 30.0 20.0 + weight 250.0 150.0 + falcon speed 320.0 250.0 + weight 1.0 0.8 + """ + return super(DataFrame, + self).drop(labels=labels, axis=axis, index=index, + columns=columns, level=level, inplace=inplace, + errors=errors) + @rewrite_axis_style_signature('mapper', [('copy', True), ('inplace', False), ('level', None)]) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index a893b2ba1a189..df489bdd84716 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2797,75 +2797,10 @@ def reindex_like(self, other, method=None, copy=True, limit=None, return self.reindex(**d) + def drop(self, labels=None, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise'): - """ - Return new object with labels in requested axis removed. - - Parameters - ---------- - labels : single label or list-like - Index or column labels to drop. - axis : int or axis name - Whether to drop labels from the index (0 / 'index') or - columns (1 / 'columns'). - index, columns : single label or list-like - Alternative to specifying `axis` (``labels, axis=1`` is - equivalent to ``columns=labels``). - - .. versionadded:: 0.21.0 - level : int or level name, default None - For MultiIndex - inplace : bool, default False - If True, do operation inplace and return None. - errors : {'ignore', 'raise'}, default 'raise' - If 'ignore', suppress error and existing labels are dropped. - - Returns - ------- - dropped : type of caller - - Raises - ------ - KeyError - If none of the labels are found in the selected axis - - Examples - -------- - >>> df = pd.DataFrame(np.arange(12).reshape(3,4), - columns=['A', 'B', 'C', 'D']) - >>> df - A B C D - 0 0 1 2 3 - 1 4 5 6 7 - 2 8 9 10 11 - - Drop columns - - >>> df.drop(['B', 'C'], axis=1) - A D - 0 0 3 - 1 4 7 - 2 8 11 - - >>> df.drop(columns=['B', 'C']) - A D - 0 0 3 - 1 4 7 - 2 8 11 - - Drop a row by index - - >>> df.drop([0, 1]) - A B C D - 2 8 9 10 11 - - Notes - ----- - Specifying both `labels` and `index` or `columns` will raise a - ValueError. - - """ + inplace = validate_bool_kwarg(inplace, 'inplace') if labels is not None: diff --git a/pandas/core/series.py b/pandas/core/series.py index 069f0372ab6e1..59ccb4e7452f5 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -2660,6 +2660,97 @@ def rename(self, index=None, **kwargs): def reindex(self, index=None, **kwargs): return super(Series, self).reindex(index=index, **kwargs) + def drop(self, labels=None, axis=0, index=None, columns=None, + level=None, inplace=False, errors='raise'): + """ + Return Series with specified index labels removed. + + Remove elements of a Series based on specifying the index labels. + When using a multi-index, labels on different levels can be removed + by specifying the level name or int. + + Parameters + ---------- + labels : single label or list-like + Index labels to drop. + axis : 0, default 0 + Redundant for application on Series. + index : None + Redundant for application on Series, but index can be used instead + of labels. + columns : None + Redundant for application on Series, but index can be used instead + of labels. + .. versionadded:: 0.21.0 + level : int or level name, optional + For MultiIndex. + inplace : bool, default False + If True, do operation inplace and return None. + errors : {'ignore', 'raise'}, default 'raise' + If 'ignore', suppress error and existing labels are dropped. + + Returns + ------- + dropped : type of caller + + See Also + -------- + Series.reindex : Return only specified index labels of Series. + Series.dropna : Return series without null values. + Series.drop_duplicates : Return Series with duplicate values removed. + + Raises + ------ + KeyError + If none of the labels are found in the index. + + Examples + -------- + >>> s = pd.Series(data=np.arange(3), index=['A','B','C']) + >>> s + A 0 + B 1 + C 2 + dtype: int64 + + Drop labels B en C + + >>> s.drop(labels=['B','C']) + A 0 + dtype: int64 + + Drop 2nd level label in MultiIndex Series + + >>> midx = pd.MultiIndex(levels=[['lama','cow','falcon'], + ... ['speed','weight','length']], + ... labels=[[0, 0, 0, 1, 1, 1, 2, 2, 2], + ... [0, 1, 2, 0, 1, 2, 0, 1, 2]]) + >>> s = pd.Series(data=[45,200,1.2,30,250,1.5,320,1,0.3], index=midx) + >>> s + lama speed 45.0 + weight 200.0 + length 1.2 + cow speed 30.0 + weight 250.0 + length 1.5 + falcon speed 320.0 + weight 1.0 + length 0.3 + dtype: float64 + + >>> s.drop(labels='weight', level=1) + lama speed 45.0 + length 1.2 + cow speed 30.0 + length 1.5 + falcon speed 320.0 + length 0.3 + dtype: float64 + """ + return super(Series, self).drop(labels=labels, axis=axis, index=index, + columns=columns, level=level, + inplace=inplace, errors=errors) + @Appender(generic._shared_docs['fillna'] % _shared_doc_kwargs) def fillna(self, value=None, method=None, axis=None, inplace=False, limit=None, downcast=None, **kwargs): From 1268785e7384dda09cc96e1106b242b890a6cd0e Mon Sep 17 00:00:00 2001 From: Jenna Vergeynst Date: Sat, 10 Mar 2018 16:35:09 +0100 Subject: [PATCH 2/7] update drop docstring --- pandas/core/frame.py | 48 +++++++++++++++++++++---------------------- pandas/core/series.py | 8 +++----- 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index c48597fb0eca4..4d97c7f9e3ccc 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -3038,7 +3038,7 @@ def reindex_axis(self, labels, axis=0, method=None, level=None, copy=True, def drop(self, labels=None, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise'): """ - Drop rows or columns. + Drop specified labels from rows or columns. Remove rows or columns by specifying label names and corresponding axis, or by specifying directly index or column names. When using a @@ -3049,19 +3049,15 @@ def drop(self, labels=None, axis=0, index=None, columns=None, ---------- labels : single label or list-like Index or column labels to drop. - axis : int or axis name, default 0 + axis : {0 or 'index', 1 or 'columns'}, default 0 Whether to drop labels from the index (0 / 'index') or columns (1 / 'columns'). - index : None - Redundant for application on Series, but index can be used instead - of labels. - columns : None - Redundant for application on Series, but index can be used instead - of labels. - + index, columns : single label or list-like + Alternative to specifying axis (labels, axis=1 + is equivalent to columns=labels). .. versionadded:: 0.21.0 level : int or level name, optional - For MultiIndex. + For MultiIndex, level for which the labels will be removed. inplace : bool, default False If True, do operation inplace and return None. errors : {'ignore', 'raise'}, default 'raise' @@ -3069,14 +3065,16 @@ def drop(self, labels=None, axis=0, index=None, columns=None, Returns ------- - dropped : type of caller + dropped : pandas.DataFrame See Also -------- + DataFrame.loc : Label-location based indexer for selection by label. DataFrame.dropna : Return DataFrame with labels on given axis omitted where (all or any) data are missing DataFrame.drop_duplicates : Return DataFrame with duplicate rows removed, optionally only considering certain columns + Series.drop : Return Series with specified index labels removed. Raises ------ @@ -3113,29 +3111,29 @@ def drop(self, labels=None, axis=0, index=None, columns=None, A B C D 2 8 9 10 11 - Drop columns and/or rows of MultiIndex + Drop columns and/or rows of MultiIndex DataFrame - >>> midx = pd.MultiIndex(levels=[['lama','cow','falcon'], - ... ['speed','weight','length']], + >>> midx = pd.MultiIndex(levels=[['lama', 'cow', 'falcon'], + ... ['speed', 'weight', 'length']], ... labels=[[0, 0, 0, 1, 1, 1, 2, 2, 2], ... [0, 1, 2, 0, 1, 2, 0, 1, 2]]) - >>> df = pd.DataFrame(index=midx, columns=['big','small'], - ... data=[[45,30],[200,100],[1.5,1],[30,20], - [250,150],[1.5,0.8],[320,250],[1,0.8], - [0.3,0.2]]) + >>> df = pd.DataFrame(index=midx, columns=['big', 'small'], + ... data=[[45,30], [200,100], [1.5,1], [30,20], + ... [250,150], [1.5,0.8], [320,250], [1,0.8], + ... [0.3,0.2]]) >>> df big small - lama speed 45.0 30.0 + lama speed 45.0 30.0 weight 200.0 100.0 length 1.5 1.0 - cow speed 30.0 20.0 + cow speed 30.0 20.0 weight 250.0 150.0 length 1.5 0.8 falcon speed 320.0 250.0 weight 1.0 0.8 length 0.3 0.2 - >>> df.drop(index='cow',columns='small') + >>> df.drop(index='cow', columns='small') big lama speed 45.0 weight 200.0 @@ -3153,10 +3151,10 @@ def drop(self, labels=None, axis=0, index=None, columns=None, falcon speed 320.0 250.0 weight 1.0 0.8 """ - return super(DataFrame, - self).drop(labels=labels, axis=axis, index=index, - columns=columns, level=level, inplace=inplace, - errors=errors) + return super(DataFrame,self).drop(labels=labels, axis=axis, + index=index, columns=columns, + level=level, inplace=inplace, + errors=errors) @rewrite_axis_style_signature('mapper', [('copy', True), ('inplace', False), diff --git a/pandas/core/series.py b/pandas/core/series.py index f236e4dc8ff17..2718628212f5b 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -2675,10 +2675,7 @@ def drop(self, labels=None, axis=0, index=None, columns=None, Index labels to drop. axis : 0, default 0 Redundant for application on Series. - index : None - Redundant for application on Series, but index can be used instead - of labels. - columns : None + index, columns : None Redundant for application on Series, but index can be used instead of labels. .. versionadded:: 0.21.0 @@ -2691,13 +2688,14 @@ def drop(self, labels=None, axis=0, index=None, columns=None, Returns ------- - dropped : type of caller + dropped : pandas.Series See Also -------- Series.reindex : Return only specified index labels of Series. Series.dropna : Return series without null values. Series.drop_duplicates : Return Series with duplicate values removed. + DataFrame.drop : Drop specified labels from rows or columns. Raises ------ From 6ade1b7cd3c3fca9f6a8c68c1b5a73f74c79a118 Mon Sep 17 00:00:00 2001 From: Jenna Vergeynst Date: Sat, 10 Mar 2018 16:37:07 +0100 Subject: [PATCH 3/7] update drop docstring --- pandas/core/frame.py | 2 +- pandas/core/series.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 4d97c7f9e3ccc..44796dc1664be 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -3038,7 +3038,7 @@ def reindex_axis(self, labels, axis=0, method=None, level=None, copy=True, def drop(self, labels=None, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise'): """ - Drop specified labels from rows or columns. + Drop rows or columns. Remove rows or columns by specifying label names and corresponding axis, or by specifying directly index or column names. When using a diff --git a/pandas/core/series.py b/pandas/core/series.py index 2718628212f5b..1002441428958 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -2695,7 +2695,7 @@ def drop(self, labels=None, axis=0, index=None, columns=None, Series.reindex : Return only specified index labels of Series. Series.dropna : Return series without null values. Series.drop_duplicates : Return Series with duplicate values removed. - DataFrame.drop : Drop specified labels from rows or columns. + DataFrame.drop : Drop rows or columns Raises ------ From 33b62a6a1bbe0042fd725fb1f2d157a73cf709ea Mon Sep 17 00:00:00 2001 From: Jenna Vergeynst Date: Sat, 10 Mar 2018 16:44:41 +0100 Subject: [PATCH 4/7] update DOC --- pandas/core/frame.py | 2 +- pandas/core/series.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 44796dc1664be..4d97c7f9e3ccc 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -3038,7 +3038,7 @@ def reindex_axis(self, labels, axis=0, method=None, level=None, copy=True, def drop(self, labels=None, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise'): """ - Drop rows or columns. + Drop specified labels from rows or columns. Remove rows or columns by specifying label names and corresponding axis, or by specifying directly index or column names. When using a diff --git a/pandas/core/series.py b/pandas/core/series.py index 1002441428958..2718628212f5b 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -2695,7 +2695,7 @@ def drop(self, labels=None, axis=0, index=None, columns=None, Series.reindex : Return only specified index labels of Series. Series.dropna : Return series without null values. Series.drop_duplicates : Return Series with duplicate values removed. - DataFrame.drop : Drop rows or columns + DataFrame.drop : Drop specified labels from rows or columns. Raises ------ From 79779a4cf292fef5e25eee7bbd5c65b31f14962c Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 12 Mar 2018 22:46:44 +0100 Subject: [PATCH 5/7] Update frame.py --- pandas/core/frame.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 4d97c7f9e3ccc..b3c7a9b074059 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -3043,25 +3043,27 @@ def drop(self, labels=None, axis=0, index=None, columns=None, Remove rows or columns by specifying label names and corresponding axis, or by specifying directly index or column names. When using a multi-index, labels on different levels can be removed by specifying - the level name or int. + the level. Parameters ---------- labels : single label or list-like Index or column labels to drop. axis : {0 or 'index', 1 or 'columns'}, default 0 - Whether to drop labels from the index (0 / 'index') or - columns (1 / 'columns'). + Whether to drop labels from the index (0 or 'index') or + columns (1 or 'columns'). index, columns : single label or list-like - Alternative to specifying axis (labels, axis=1 - is equivalent to columns=labels). + Alternative to specifying axis (``labels, axis=1`` + is equivalent to ``columns=labels``). + .. versionadded:: 0.21.0 level : int or level name, optional - For MultiIndex, level for which the labels will be removed. + For MultiIndex, level from which the labels will be removed. inplace : bool, default False If True, do operation inplace and return None. errors : {'ignore', 'raise'}, default 'raise' - If 'ignore', suppress error and existing labels are dropped. + If 'ignore', suppress error and only existing labels are + dropped. Returns ------- @@ -3135,10 +3137,10 @@ def drop(self, labels=None, axis=0, index=None, columns=None, >>> df.drop(index='cow', columns='small') big - lama speed 45.0 - weight 200.0 + lama speed 45.0 + weight 200.0 length 1.5 - falcon speed 320.0 + falcon speed 320.0 weight 1.0 length 0.3 From 029560b9d298c48b8a7df929e8bce91db9833660 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 12 Mar 2018 22:48:38 +0100 Subject: [PATCH 6/7] Update series.py --- pandas/core/series.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 2718628212f5b..f097ff3b5145e 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -2667,7 +2667,7 @@ def drop(self, labels=None, axis=0, index=None, columns=None, Remove elements of a Series based on specifying the index labels. When using a multi-index, labels on different levels can be removed - by specifying the level name or int. + by specifying the level. Parameters ---------- @@ -2678,13 +2678,14 @@ def drop(self, labels=None, axis=0, index=None, columns=None, index, columns : None Redundant for application on Series, but index can be used instead of labels. + .. versionadded:: 0.21.0 level : int or level name, optional - For MultiIndex. + For MultiIndex, level for which the labels will be removed. inplace : bool, default False If True, do operation inplace and return None. errors : {'ignore', 'raise'}, default 'raise' - If 'ignore', suppress error and existing labels are dropped. + If 'ignore', suppress error and only existing labels are dropped. Returns ------- From 643db5c38699a246efdbd248a0b1b209a57fa767 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 12 Mar 2018 22:58:18 +0100 Subject: [PATCH 7/7] fix whitespace --- pandas/core/frame.py | 58 +++++++++++++++++++++---------------------- pandas/core/series.py | 7 +++--- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index b3c7a9b074059..8e25432ecef26 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -3120,43 +3120,43 @@ def drop(self, labels=None, axis=0, index=None, columns=None, ... labels=[[0, 0, 0, 1, 1, 1, 2, 2, 2], ... [0, 1, 2, 0, 1, 2, 0, 1, 2]]) >>> df = pd.DataFrame(index=midx, columns=['big', 'small'], - ... data=[[45,30], [200,100], [1.5,1], [30,20], - ... [250,150], [1.5,0.8], [320,250], [1,0.8], - ... [0.3,0.2]]) + ... data=[[45, 30], [200, 100], [1.5, 1], [30, 20], + ... [250, 150], [1.5, 0.8], [320, 250], + ... [1, 0.8], [0.3,0.2]]) >>> df - big small - lama speed 45.0 30.0 - weight 200.0 100.0 - length 1.5 1.0 - cow speed 30.0 20.0 - weight 250.0 150.0 - length 1.5 0.8 - falcon speed 320.0 250.0 - weight 1.0 0.8 - length 0.3 0.2 + big small + lama speed 45.0 30.0 + weight 200.0 100.0 + length 1.5 1.0 + cow speed 30.0 20.0 + weight 250.0 150.0 + length 1.5 0.8 + falcon speed 320.0 250.0 + weight 1.0 0.8 + length 0.3 0.2 >>> df.drop(index='cow', columns='small') big lama speed 45.0 weight 200.0 - length 1.5 - falcon speed 320.0 - weight 1.0 - length 0.3 + length 1.5 + falcon speed 320.0 + weight 1.0 + length 0.3 >>> df.drop(index='length', level=1) - big small - lama speed 45.0 30.0 - weight 200.0 100.0 - cow speed 30.0 20.0 - weight 250.0 150.0 - falcon speed 320.0 250.0 - weight 1.0 0.8 - """ - return super(DataFrame,self).drop(labels=labels, axis=axis, - index=index, columns=columns, - level=level, inplace=inplace, - errors=errors) + big small + lama speed 45.0 30.0 + weight 200.0 100.0 + cow speed 30.0 20.0 + weight 250.0 150.0 + falcon speed 320.0 250.0 + weight 1.0 0.8 + """ + return super(DataFrame, self).drop(labels=labels, axis=axis, + index=index, columns=columns, + level=level, inplace=inplace, + errors=errors) @rewrite_axis_style_signature('mapper', [('copy', True), ('inplace', False), diff --git a/pandas/core/series.py b/pandas/core/series.py index f097ff3b5145e..4a0fe63a829c6 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -2720,11 +2720,12 @@ def drop(self, labels=None, axis=0, index=None, columns=None, Drop 2nd level label in MultiIndex Series - >>> midx = pd.MultiIndex(levels=[['lama','cow','falcon'], - ... ['speed','weight','length']], + >>> midx = pd.MultiIndex(levels=[['lama', 'cow', 'falcon'], + ... ['speed', 'weight', 'length']], ... labels=[[0, 0, 0, 1, 1, 1, 2, 2, 2], ... [0, 1, 2, 0, 1, 2, 0, 1, 2]]) - >>> s = pd.Series(data=[45,200,1.2,30,250,1.5,320,1,0.3], index=midx) + >>> s = pd.Series([45, 200, 1.2, 30, 250, 1.5, 320, 1, 0.3], + ... index=midx) >>> s lama speed 45.0 weight 200.0