Skip to content

Commit

Permalink
refactor(pandas): remove unreachable code in pandas backend (#9786)
Browse files Browse the repository at this point in the history
  • Loading branch information
mesejo authored Aug 7, 2024
1 parent acfcac8 commit dc6bfe2
Showing 1 changed file with 0 additions and 18 deletions.
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

0 comments on commit dc6bfe2

Please sign in to comment.