data-apis / dataframe-api

RFC document, tooling and other content related to the dataframe API standard
https://data-apis.org/dataframe-api/draft/index.html
MIT License
102 stars 20 forks source link

Example of non-dictionary categorical? #357

Closed MarcoGorelli closed 1 month ago

MarcoGorelli commented 5 months ago

Hi

https://data-apis.org/dataframe-protocol/latest/API.html says

     Returns the dictionary with description on how to interpret the data buffer:
        - "is_ordered" : bool, whether the ordering of dictionary indices is
                         semantically meaningful.
        - "is_dictionary" : bool, whether a mapping of
                            categorical values to other objects exists
        - "categories" : Column representing the (implicit) mapping of indices to
                         category values (e.g. an array of cat1, cat2, ...).
                         None if not a dictionary-style categorical.

From having a looked at a few implementations, is_dictionary always seems to be hard-coded to True? Is there any example where it's False?

MarcoGorelli commented 1 month ago

i guess not 😄