diff --git a/narwhals/series.py b/narwhals/series.py index 37d6b29db..b5b6e1746 100644 --- a/narwhals/series.py +++ b/narwhals/series.py @@ -598,6 +598,9 @@ def cast(self: Self, dtype: DType | type[DType]) -> Self: Arguments: dtype: Data type that the object will be cast into. + Returns: + A new Series with the specified data type. + Examples: >>> import pandas as pd >>> import polars as pl @@ -812,6 +815,9 @@ def skew(self: Self) -> Any: def count(self) -> Any: """Returns the number of non-null elements in the Series. + Returns: + The number of non-null elements in the Series. + Examples: >>> import pandas as pd >>> import polars as pl @@ -1117,6 +1123,9 @@ def clip( lower_bound: Lower bound value. upper_bound: Upper bound value. + Returns: + A new Series with values clipped to the specified bounds. + Examples: >>> import pandas as pd >>> import polars as pl @@ -1252,6 +1261,9 @@ def is_in(self, other: Any) -> Self: def arg_true(self) -> Self: """Find elements where boolean Series is True. + Returns: + A new Series with the indices of elements that are True. + Examples: >>> import pandas as pd >>> import polars as pl