Skip to content

Commit

Permalink
Remove from_dask_dataframe (#1167)
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl authored Nov 15, 2024
1 parent ac5514d commit a7a963a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
17 changes: 0 additions & 17 deletions dask_expr/_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5020,23 +5020,6 @@ def from_dict(
)


def from_dask_dataframe(*args, **kwargs) -> FrameBase:
"""Create a dask-expr collection from a legacy dask-dataframe collection
WARNING: This API is deprecated. Please use `from_legacy_dataframe`.
Parameters
----------
optimize
Whether to optimize the graph before conversion.
"""
warnings.warn(
"`from_dask_dataframe` is deprecated, please use `from_legacy_dataframe`.",
FutureWarning,
)
return from_legacy_dataframe(*args, **kwargs)


def from_legacy_dataframe(ddf: _Frame, optimize: bool = True) -> FrameBase:
"""Create a dask-expr collection from a legacy dask-dataframe collection
Expand Down
6 changes: 0 additions & 6 deletions dask_expr/io/tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
DataFrame,
from_array,
from_dask_array,
from_dask_dataframe,
from_dict,
from_legacy_dataframe,
from_map,
Expand Down Expand Up @@ -235,11 +234,6 @@ def test_from_legacy_dataframe(optimize):
assert isinstance(df.expr, Expr)
assert_eq(df, ddf)

# Check deprecated API
with pytest.warns(FutureWarning, match="deprecated"):
df2 = from_dask_dataframe(ddf, optimize=optimize)
assert_eq(df, df2)


@pytest.mark.parametrize("optimize", [True, False])
def test_to_legacy_dataframe(optimize):
Expand Down

0 comments on commit a7a963a

Please sign in to comment.