-
Notifications
You must be signed in to change notification settings - Fork 176
Description
Some odds and ends that aren't in a category (yet?)
PRs
- chore: Simplify
to_py_scalar#2503 - fix: Include all backends in
get_native_namespace#2608 - chore: Simplify
is_ordered_categorical#2618 - refactor: Simplify
Implementation.to_native_namespace#2620 - refactor: Simplify
combine_metadata#2836 - refactor: Simplify
calculate_timestamp_datetimeandcalculate_timestamp_date#2838 - refactor: Reduce returns in
Namespace.from_native_object#2914
Tracking
Complex warnings
Best to leave this until all the from_native methods are ready
narwhals/narwhals/translate.py
Line 363 in 018d923
| def _from_native_impl( # noqa: C901, PLR0911, PLR0912, PLR0915 |
Completed
narwhals/narwhals/translate.py
Line 776 in 018d923
| def to_py_scalar(scalar_like: Any) -> Any: # noqa: C901, PLR0911, PLR0912 |
narwhals/narwhals/translate.py
Lines 634 to 636 in 018d923
| def _get_native_namespace_single_obj( # noqa: PLR0911 | |
| obj: DataFrame[Any] | LazyFrame[Any] | Series[Any] | IntoFrame | IntoSeries, | |
| ) -> Any: |
Line 1148 in 018d923
| def is_ordered_categorical(series: Series[Any]) -> bool: # noqa: PLR0911 |
Line 345 in 018d923
| def to_native_namespace(self) -> ModuleType: # noqa: C901, PLR0911 |
narwhals/narwhals/_expression_parsing.py
Line 363 in 018d923
| def combine_metadata( # noqa: C901, PLR0912, PLR0915 |
narwhals/narwhals/_pandas_like/utils.py
Lines 599 to 601 in 018d923
| def calculate_timestamp_datetime( # noqa: C901, PLR0912 | |
| s: pd.Series[int], original_time_unit: str, time_unit: str | |
| ) -> pd.Series[int]: |
narwhals/narwhals/_namespace.py
Lines 289 to 292 in 018d923
| @classmethod | |
| def from_native_object( # noqa: PLR0911 | |
| cls: type[Namespace[Any]], native: NativeAny, / | |
| ) -> Namespace[Any]: |