Skip to content

Commit

Permalink
raise notimplementederror
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Feb 24, 2024
1 parent 8c56cf8 commit 397cd4d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions narwhals/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)

0 comments on commit 397cd4d

Please sign in to comment.