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
Note that using a column for Translate is not documented nor implemented for DuckDB, but it is implemented in here for pandas.
What would be the solution? Delete these methods or fix them?
What version of ibis are you using?
dev
What backend(s) are you using, if any?
pandas
Relevant log output
Traceback (most recent call last):
File "/Users/daniel.mesejo/PycharmProjects/ibis/try_substr.py", line 15, in<module>
result = table.fruit.translate('abc', table.to_column).execute()
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/expr/types/core.py", line 303, in execute
return self._find_backend(use_default=True).execute(
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/backends/pandas/__init__.py", line 299, in execute
return execute_and_reset(node, params=params, **kwargs)
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/backends/pandas/core.py", line 482, in execute_and_reset
result = execute(
File "/Users/daniel.mesejo/opt/anaconda3/envs/ibis-dev/lib/python3.10/site-packages/multipledispatch/dispatcher.py", line 278, in __call__
return func(*args, **kwargs)
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/backends/pandas/trace.py", line 136, in traced_func
return func(*args, **kwargs)
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/backends/pandas/core.py", line 428, in main_execute
return execute_with_scope(
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/backends/pandas/core.py", line 218, in execute_with_scope
result = execute_until_in_scope(
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/backends/pandas/trace.py", line 136, in traced_func
return func(*args, **kwargs)
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/backends/pandas/core.py", line 350, in execute_until_in_scope
result = execute_node(
File "/Users/daniel.mesejo/opt/anaconda3/envs/ibis-dev/lib/python3.10/site-packages/multipledispatch/dispatcher.py", line 278, in __call__
return func(*args, **kwargs)
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/backends/pandas/trace.py", line 136, in traced_func
return func(*args, **kwargs)
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/backends/pandas/execution/strings.py", line 336, in execute_series_translate_scalar_series
table = to_string.map(lambda y, x=from_string: str.maketrans(x=x, y=y))
File "/Users/daniel.mesejo/opt/anaconda3/envs/ibis-dev/lib/python3.10/site-packages/pandas/core/series.py", line 4393, in map
new_values = self._map_values(arg, na_action=na_action)
File "/Users/daniel.mesejo/opt/anaconda3/envs/ibis-dev/lib/python3.10/site-packages/pandas/core/base.py", line 924, in _map_values
new_values = map_f(values, mapper)
File "pandas/_libs/lib.pyx", line 2834, in pandas._libs.lib.map_infer
File "/Users/daniel.mesejo/PycharmProjects/ibis/ibis/backends/pandas/execution/strings.py", line 336, in<lambda>
table = to_string.map(lambda y, x=from_string: str.maketrans(x=x, y=y))
TypeError: str.maketrans() takes no keyword arguments
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Removing the caller's explicit keyword arguments makes the function run, but I don't know if the output makes sense. For the original code, it produces:
- use list comprehension in execute_substring_series_series, which is
slightly faster and removes the use of the stateful function
- use str.contains in execute_string_like_series_string, which is
supported by pandas
- remove the duplicated implementation of EndsWith and StartsWith
fixesibis-project#6157
- use list comprehension in execute_substring_series_series, which is
slightly faster and removes the use of the stateful function
- use str.contains in execute_string_like_series_string, which is
supported by pandas
- remove the duplicated implementation of EndsWith and StartsWith
fixes#6157
What happened?
The following code raises a TypeError exception:
Note that using a column for
Translate
is not documented nor implemented for DuckDB, but it is implemented in here for pandas.What would be the solution? Delete these methods or fix them?
What version of ibis are you using?
dev
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: