Skip to content

Commit

Permalink
python: add strip to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Jan 10, 2022
1 parent 75bf676 commit a17f36f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions py-polars/docs/source/reference/expression.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ The following methods are available under the `Expr.str` attribute.
ExprStringNameSpace.lengths
ExprStringNameSpace.to_uppercase
ExprStringNameSpace.to_lowercase
ExprStringNameSpace.strip
ExprStringNameSpace.lstrip
ExprStringNameSpace.rstrip
ExprStringNameSpace.contains
ExprStringNameSpace.json_path_match
ExprStringNameSpace.extract
Expand Down
1 change: 1 addition & 0 deletions py-polars/docs/source/reference/series.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ The following methods are available under the `Series.str` attribute.
StringNameSpace.replace_all
StringNameSpace.to_lowercase
StringNameSpace.to_uppercase
StringNameSpace.strip
StringNameSpace.rstrip
StringNameSpace.lstrip
StringNameSpace.slice
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/internals/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2492,7 +2492,7 @@ def lstrip(self) -> Expr:

def rstrip(self) -> Expr:
"""
Remove leading whitespace.
Remove trailing whitespace.
"""
return wrap_expr(self._pyexpr.str_rstrip())

Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/internals/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3649,7 +3649,7 @@ def lstrip(self) -> Series:

def rstrip(self) -> Series:
"""
Remove leading whitespace.
Remove trailing whitespace.
"""
s = wrap_s(self._s)
return s.to_frame().select(pli.col(s.name).str.rstrip()).to_series()
Expand Down

0 comments on commit a17f36f

Please sign in to comment.