Skip to content

Commit

Permalink
Cover to_list
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Oct 17, 2024
1 parent 492ee51 commit 8b9b8de
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_tbl_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
is_series,
reorder,
to_frame,
to_list,
validate_frame,
copy_frame,
)
Expand Down Expand Up @@ -298,6 +299,12 @@ def test_is_series_false():
assert not is_series(1)


def test_to_list(ser: SeriesLike):
pylist = to_list(ser)
assert len(pylist) == 3
assert pylist[:2] == [1.0, 2.0]


def test_cast_frame_to_string_polars_list_col():
df = pl.DataFrame({"x": [[1, 2], [3]], "y": [1, None], "z": [{"a": 1}, {"a": 2}]})
new_df = cast_frame_to_string(df)
Expand Down

0 comments on commit 8b9b8de

Please sign in to comment.