From 397cd4dd869d691ac936adb1518db7c4d887f5a7 Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Sat, 24 Feb 2024 14:29:01 +0000 Subject: [PATCH] raise notimplementederror --- narwhals/translate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/narwhals/translate.py b/narwhals/translate.py index adfb84ea8..2e84a17cb 100644 --- a/narwhals/translate.py +++ b/narwhals/translate.py @@ -111,7 +111,7 @@ def translate_frame( ) msg = f"Could not translate DataFrame {type(df)}, please open a feature request." - raise TypeError(msg) + raise NotImplementedError(msg) def translate_series( @@ -144,12 +144,12 @@ def translate_series( return translate_series(series, implementation="modin") - msg = f"Could not translate DataFrame {type(series)}, please open a feature request." - raise TypeError(msg) + msg = f"Could not translate {type(series)}, please open a feature request." + raise NotImplementedError(msg) def translate_any(obj: Any) -> tuple[Series | DataFrame, Namespace]: try: return translate_series(obj) - except TypeError: + except NotImplementedError: return translate_frame(obj, eager_only=True)