Skip to content

Commit

Permalink
post merge fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Jun 20, 2024
1 parent a517e9a commit 1ad45cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/src/rust/user-guide/transformations/unpivot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("{}", &df);
// --8<-- [end:df]

// --8<-- [start:melt]
let out = df.melt(["A", "B"], ["C", "D"])?;
// --8<-- [start:unpivot]
let out = df.unpivot(["A", "B"], ["C", "D"])?;
println!("{}", &out);
// --8<-- [end:melt]
// --8<-- [end:unpivot]
Ok(())
}
4 changes: 2 additions & 2 deletions py-polars/tests/unit/operations/test_unpivot.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def test_unpivot_no_value_vars() -> None:
assert_frame_equal(result, expected)


def test_melt_raise_list() -> None:
def test_unpivot_raise_list() -> None:
with pytest.raises(pl.exceptions.InvalidOperationError):
pl.LazyFrame(
{"a": ["x", "y"], "b": [["test", "test2"], ["test3", "test4"]]}
).melt().collect()
).unpivot().collect()

0 comments on commit 1ad45cf

Please sign in to comment.