Skip to content

Commit 1f421d8

Browse files
committed
feat: add sink_parquet
1 parent 48793cf commit 1f421d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

narwhals_daft/dataframe.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
if TYPE_CHECKING:
3030
from collections.abc import Iterable, Iterator, Mapping, Sequence
31+
from io import BytesIO
32+
from pathlib import Path
3133
from types import ModuleType
3234

3335
from narwhals._compliant.typing import CompliantDataFrameAny
@@ -380,11 +382,13 @@ def group_by(
380382
def explode(self, columns: Sequence[str]) -> DaftLazyFrame:
381383
return self._with_native(self.native.explode(*columns))
382384

385+
def sink_parquet(self, file: str | Path | BytesIO) -> None:
386+
self.native.write_parquet(str(file))
387+
383388
gather_every = not_implemented.deprecated(
384389
"`LazyFrame.gather_every` is deprecated and will be removed in a future version."
385390
)
386391
join_asof = not_implemented()
387392
tail = not_implemented.deprecated(
388393
"`LazyFrame.tail` is deprecated and will be removed in a future version."
389394
)
390-
sink_parquet = not_implemented()

0 commit comments

Comments
 (0)