Skip to content

Commit

Permalink
Merge pull request #472 from jrycw/fix-polars-pivot
Browse files Browse the repository at this point in the history
docs: fix deprecated warning for `pl.DataFrame.pivot()`
  • Loading branch information
rich-iannone authored Sep 30, 2024
2 parents cec3e8d + 6ce2090 commit 0dbef3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/blog/introduction-0.2.0/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ wide_pops = (
pl.col("country_code_2").is_in(["FM", "GU", "KI", "MH", "MP", "NR", "PW"])
& pl.col("year").is_in([2000, 2010, 2020])
)
.pivot(index="country_name", columns="year", values="population")
.pivot(index="country_name", on="year", values="population")
.sort("2020", descending=True)
)
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/colorizing-with-data.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ sza_pivot = (
.filter((pl.col("latitude") == "20") & (pl.col("tst") <= "1200"))
.select(pl.col("*").exclude("latitude"))
.drop_nulls()
.pivot(values="sza", index="month", columns="tst", sort_columns=True)
.pivot(values="sza", index="month", on="tst", sort_columns=True)
)
(
Expand Down

0 comments on commit 0dbef3e

Please sign in to comment.