@@ -112,7 +112,8 @@ def _with_compliant(self, df: Any) -> Self:
112112 def _flatten_and_extract (
113113 self , * exprs : IntoExpr | Iterable [IntoExpr ], ** named_exprs : IntoExpr
114114 ) -> tuple [list [CompliantExprAny ], list [ExprKind ]]:
115- """Process `args` and `kwargs`, extracting underlying objects as we go, interpreting strings as column names."""
115+ # Process `args` and `kwargs`, extracting underlying objects as we go.
116+ # NOTE: Strings are interpreted as column names.
116117 out_exprs = []
117118 out_kinds = []
118119 for expr in flatten (exprs ):
@@ -700,6 +701,9 @@ def __arrow_c_stream__(self, requested_schema: object | None = None) -> object:
700701
701702 See [PyCapsule Interface](https://arrow.apache.org/docs/dev/format/CDataInterface/PyCapsuleInterface.html)
702703 for more.
704+
705+ Returns:
706+ A PyCapsule containing a C ArrowArrayStream representation of the object.
703707 """
704708 native_frame = self ._compliant_frame ._native_frame
705709 if supports_arrow_c_stream (native_frame ):
@@ -900,9 +904,6 @@ def write_parquet(self, file: str | Path | BytesIO) -> None:
900904 file: String, path object or file-like object to which the dataframe will be
901905 written.
902906
903- Returns:
904- None.
905-
906907 Examples:
907908 >>> import pyarrow as pa
908909 >>> import narwhals as nw
@@ -1459,7 +1460,7 @@ def with_columns(
14591460 The columns will be renamed to the keyword used.
14601461
14611462 Returns:
1462- DataFrame: A new DataFrame with the columns added.
1463+ New DataFrame with the columns added.
14631464
14641465 Note:
14651466 Creating a new DataFrame using this method does not create a new copy of
@@ -2744,7 +2745,7 @@ def with_columns(
27442745 The columns will be renamed to the keyword used.
27452746
27462747 Returns:
2747- LazyFrame: A new LazyFrame with the columns added.
2748+ New LazyFrame with the columns added.
27482749
27492750 Note:
27502751 Creating a new LazyFrame using this method does not create a new copy of
@@ -3044,9 +3045,6 @@ def sink_parquet(self, file: str | Path | BytesIO) -> None:
30443045 file: String, path object or file-like object to which the dataframe will be
30453046 written.
30463047
3047- Returns:
3048- None.
3049-
30503048 Examples:
30513049 >>> import polars as pl
30523050 >>> import narwhals as nw
0 commit comments