We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
describe_categorical
In the interchange protocol, describe_categorical should return a dict (mind the spec's API type annotation is faulty), but Vaex returns a tuple
vaex/packages/vaex-core/vaex/dataframe_protocol.py
Line 443 in 35c250d
This prevents interchanging dataframes with categorical columns, e.g. with pandas-dev/pandas#46141
>>> import numpy as np >>> import vaex >>> df = vaex.from_items(("foo", np.asarray([4, 2, 1, 3, 3], dtype="int8"))) >>> df = df.categorize("foo") >>> from pandas.api.exchange import from_dataframe >>> from_dataframe(df) .../pandas/core/exchange/from_dataframe.py:184, in categorical_column_to_series(col) 169 """ 170 Convert a column holding categorical data to a pandas Series. 171 (...) 180 that keeps the memory alive. 181 """ 182 categorical = col.describe_categorical --> 184 if not categorical["is_dictionary"]: 185 raise NotImplementedError("Non-dictionary categoricals not supported yet") 187 mapping = categorical["mapping"] TypeError: tuple indices must be integers or slices, not str
The text was updated successfully, but these errors were encountered:
Column.describe_categorical
I'll submit a PR for this
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
In the interchange protocol,
describe_categorical
should return a dict (mind the spec's API type annotation is faulty), but Vaex returns a tuplevaex/packages/vaex-core/vaex/dataframe_protocol.py
Line 443 in 35c250d
This prevents interchanging dataframes with categorical columns, e.g. with pandas-dev/pandas#46141
The text was updated successfully, but these errors were encountered: