raulcd commented on issue #47022: URL: https://github.com/apache/arrow/issues/47022#issuecomment-3047779825
Hi, thanks for opening the issue! Could you share the versions of the different libraries you are using? Can you also share the stack trace and not just a single error line, I can't seem to find the error msg on our code base and the typo on `ddictionary` should be obvious to find. I tries to reproduce and the polars API doesn't seem to be the same that's why I am asking for versions: ```python In [1]: import polars as pl ...: import pyarrow as pa ...: ...: n = 100 ...: cat_values = [f"cat_{i}" for i in range(n)] ...: df = pl.DataFrame({ ...: "cat": cat_values, ...: "val": list(range(n)) ...: }) ...: arrow_table = df.to_arrow() ...: ...: dict_type = pa.dictionary(index_type=pa.uint16(), value_type=pa.string()) ...: arrow_table = arrow_table.set_column( ...: arrow_table.schema.get_field_index("cat"), ...: "cat", ...: arrow_table.column("cat").cast(dict_type) ...: ) ...: ...: print("Arrow schema:", arrow_table.schema) Arrow schema: cat: dictionary<values=string, indices=uint16, ordered=0> val: int64 In [2]: pdf = pl.from_table(arrow_table).to_pandas() --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[2], line 1 ----> 1 pdf = pl.from_table(arrow_table).to_pandas() File ~/code/venv/lib/python3.12/site-packages/polars/__init__.py:479, in __getattr__(name) 476 return getattr(dtgroup, name) 478 msg = f"module {__name__!r} has no attribute {name!r}" --> 479 raise AttributeError(msg) AttributeError: module 'polars' has no attribute 'from_table' ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org