You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ~/Desktop/logistics/backend/.venv/lib/python3.11/site-packages/ibis/backends/pandas/executor.py:142, in PandasExecutor.visit(cls, op, **operands)
140 return cls.elementwise(func, **kwargs)
141 else:
--> 142 raise OperationNotDefinedError(
143 "No columnwise, serieswise, rowwise or elementwise "
144 f"implementation found for multi-argument operation {typ}"
145 )
146 else: # noqa: PLR5501
147 if func := cls.kernels.serieswise.get(typ):
OperationNotDefinedError: No columnwise, serieswise, rowwise or elementwise implementation found for multi-argument operation <class 'ibis.expr.operations.structs.StructColumn'>
What version of ibis are you using?
9.0.0
What backend(s) are you using, if any?
pandas
Relevant log output
def create_unpivot_table(df, columns_to_merge):
# Connect to the Pandas DataFrame
con = ibis.pandas.connect({"df": df})
table = con.table("df")
# Use pivot_longer to unpivot the table
unpivot_table = table.pivot_longer(
names_to="New Column (1)",
values_to="New Column (2)",
col=sel.where(lambda col: col.get_name() in columns_to_merge),
).execute()
return unpivot_table
df = pd.DataFrame({
"A": ["foo", "foo", "foo", "foo", "foo", "bar", "bar", "bar", "bar"],
"B": ["one", "one", "one", "two", "two", "one", "one", "two", "two"],
"C": ["small", "large", "large", "small", "small", "large", "small", "small", "large"],
"D": [1, 2, 2, 3, 3, 4, 5, 6, 7],
"E": [2, 4, 5, 5, 6, 6, 8, 9, 9]
})
create_unpivot_table(df, ["D", "E"])
File ~/Desktop/logistics/backend/.venv/lib/python3.11/site-packages/ibis/backends/pandas/executor.py:142, in PandasExecutor.visit(cls, op, **operands)
140 return cls.elementwise(func, **kwargs)
141 else:
--> 142 raise OperationNotDefinedError(
143 "No columnwise, serieswise, rowwise or elementwise "
144 f"implementation found for multi-argument operation {typ}"
145 )
146 else: # noqa: PLR5501
147 if func := cls.kernels.serieswise.get(typ):
OperationNotDefinedError: No columnwise, serieswise, rowwise or elementwise implementation found for multi-argument operation <class 'ibis.expr.operations.structs.StructColumn'>
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
What happened?
Getting this error
File ~/Desktop/logistics/backend/.venv/lib/python3.11/site-packages/ibis/backends/pandas/executor.py:142, in PandasExecutor.visit(cls, op, **operands)
140 return cls.elementwise(func, **kwargs)
141 else:
--> 142 raise OperationNotDefinedError(
143 "No columnwise, serieswise, rowwise or elementwise "
144 f"implementation found for multi-argument operation {typ}"
145 )
146 else: # noqa: PLR5501
147 if func := cls.kernels.serieswise.get(typ):
OperationNotDefinedError: No columnwise, serieswise, rowwise or elementwise implementation found for multi-argument operation <class 'ibis.expr.operations.structs.StructColumn'>
What version of ibis are you using?
9.0.0
What backend(s) are you using, if any?
pandas
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: