-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Problem with column header text alignment when printing df that contains emojis #58098
New issue
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
Comments
Hi, This is my first time contributing to an open-source project and I would love to work on this issue. |
take |
@madhuramkumar Just checking in on the progress here. You doing okay, buddy? |
Hi! Yes, I am still working on fixing it. Just for context, I am doing this with a partner as part of a class project in EECS 481 at the University of Michigan where we are required to contribute to an open-source project, so it might take a little bit longer for us to get accustomed to the project. We hope to have a PR in in the next week or so. Thank you! |
@AlanCPSC We might have hit a roadblock and might need some additional assistance if possible. After some digging we think the issue stems from the _make_fixed_width function in the pandas/io/formats/format.py file. We attempted to edit this function to account for the emojis (identifying them using regex, and adding additional space if necessary) to change the max_len variable, and were able to change the alignment, but not in the way we intended. We wrote some unit tests in the tests/io/formats/test_format.py folder under the TestDataFrameFormatting class, and it seemed that our changes did not modify the alignment of the column header. We would gladly appreciate any help or guidance regarding whether we are working with the right function, or how to tackle the issue in general. `def _make_fixed_width(
|
Here is our test file: `def test_display_settings_with_emojis(self):
|
take |
Pandas version checks
Reproducible Example
With Emojis
Without Emojis
Issue Description
Dataframe with emojis has MISALIGNED header text when printed.
Expected Behavior
Dataframe with emojis has ALIGNED header text when printed.
Installed Versions
The text was updated successfully, but these errors were encountered: