Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(pandas): remove unreachable code in pandas backend #9786

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions ibis/backends/pandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,24 +245,6 @@ def drop_table(self, name: str, *, force: bool = False) -> None:

def _convert_object(self, obj: Any) -> Any:
return _convert_object(obj, self)
if isinstance(obj, pd.DataFrame):
return obj
elif isinstance(obj, ir.Table):
op = obj.op()
if isinstance(op, ops.InMemoryTable):
return op.data.to_frame()
else:
raise com.BackendConversionError(
f"Unable to convert {obj.__class__} object "
f"to backend type: {self.__class__.backend_table_type}"
)
elif isinstance(obj, pa.Table):
return obj.to_pandas()
else:
raise com.BackendConversionError(
f"Unable to convert {obj.__class__} object "
f"to backend type: {self.__class__.backend_table_type}"
)

@classmethod
@lru_cache
Expand Down