Skip to content

Commit

Permalink
Fix prefix/suffix docstrings. (#4122)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghuls committed Jul 22, 2022
1 parent 74730bb commit bb45843
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py-polars/polars/internals/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,12 +585,12 @@ def prefix(self, prefix: str) -> Expr:
>>> df.select(
... [
... pl.all(),
... pl.all().reverse().suffix("_reverse"),
... pl.all().reverse().prefix("reverse_"),
... ]
... )
shape: (5, 8)
┌─────┬────────┬─────┬────────┬───────────┬────────────────┬───────────┬──────────────┐
│ A ┆ fruits ┆ B ┆ cars ┆ A_reversefruits_reverseB_reversecars_reverse
│ A ┆ fruits ┆ B ┆ cars ┆ reverse_Areverse_fruitsreverse_Breverse_cars
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ i64 ┆ str ┆ i64 ┆ str ┆ i64 ┆ str ┆ i64 ┆ str │
╞═════╪════════╪═════╪════════╪═══════════╪════════════════╪═══════════╪══════════════╡
Expand Down Expand Up @@ -642,12 +642,12 @@ def suffix(self, suffix: str) -> Expr:
>>> df.select(
... [
... pl.all(),
... pl.all().reverse().prefix("reverse_"),
... pl.all().reverse().suffix("_reverse"),
... ]
... )
shape: (5, 8)
┌─────┬────────┬─────┬────────┬───────────┬────────────────┬───────────┬──────────────┐
│ A ┆ fruits ┆ B ┆ cars ┆ reverse_Areverse_fruitsreverse_Breverse_cars
│ A ┆ fruits ┆ B ┆ cars ┆ A_reversefruits_reverseB_reversecars_reverse
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ i64 ┆ str ┆ i64 ┆ str ┆ i64 ┆ str ┆ i64 ┆ str │
╞═════╪════════╪═════╪════════╪═══════════╪════════════════╪═══════════╪══════════════╡
Expand Down

0 comments on commit bb45843

Please sign in to comment.