How to display names of IntEnums in Pandas DataFrames

Viewed 454

I have an IntEnum which I am using for column names in a pandas dataframe. I want the names of the enum to display rather then the integer values, but I can't seem to figure out how to do this. I figured pandas would use the __format__ method for display, so I tried monkey patching the method of my IntEnum but no dice. Is this possible?

1 Answers

This turned out to be a more fundamental issue in Pandas which is being tracked with Issue #36124. I will post an update to this question if and when a PR to address gets merged.

Related