Commits


Alenka Frim authored and GitHub committed db420c9cb6d
GH-38034: [Python] DataFrame Interchange Protocol - correct dtype information for categorical columns (#38065) ### Rationale for this change See: https://github.com/apache/arrow/issues/38034#issue-1927839216 ### What changes are included in this PR? The `f_string` for the columns with categorical dtype is now corrected to reflect the type of the indices from the dictionary data type. Bit width has been correct before. From the spec: > For categoricals, the format string describes the type of the categorical in the data buffer. In case of a separate encoding of the categorical (e.g. an integer to string mapping), this can be derived from ``self.describe_categorical``. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: #38034 Authored-by: AlenkaF <frim.alenka@gmail.com> Signed-off-by: AlenkaF <frim.alenka@gmail.com>