-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Some Unicode emoji (🪩🫠, maybe others?) are categorized as None, breaking HTML rendering #1325
Comments
Same here. Not only the html, but it occurs in the notebook widget. |
same here |
@fabclmnt I am also encountering this problem, and that installation did not solve the problem. As a workaround, one can simply ignore these keys. At this line: for category_alias_name, category_alias_counts in sorted(
summary["category_alias_char_counts"].items(), key=lambda x: -len(x[1])
):
category_alias_name = category_alias_name.replace("_", " ") Replace it with for category_alias_name, category_alias_counts in sorted(
summary["category_alias_char_counts"].items(), key=lambda x: -len(x[1])
):
if category_alias_name is None:
continue
category_alias_name = category_alias_name.replace("_", " ") or for category_alias_name, category_alias_counts in sorted(
summary["category_alias_char_counts"].items(), key=lambda x: -len(x[1])
):
if category_alias_name is None:
category_alias_name = "None"
category_alias_name = category_alias_name.replace("_", " ") |
Hey everyone! Made a PR #1632 on this matter, since the previous one isn't merged or supported. I'll be happy to update or correct everything to the latest code updates :) |
Current Behaviour
Rendering a report to HTML fails completely:
Expected Behaviour
unicode_summary_vc()
should check if the returned category is None and replace it with a string. For example "None" or "Other Symbol", depending on your design philosophy.render_categorical_unicode()
should work correctly when summary["category_alias_char_counts"] contains a None key instead of a string.Maybe this is related to #1068 and #1070 and the two supported Unicode dependencies behaving differently?
Data Description
Originally encountered with https://www.kaggle.com/datasets/salvatorerastelli/spotify-and-youtube, but even a minimal example works.
Code that reproduces the bug
pandas-profiling version
4.1.2
Dependencies
OS
MacOS 13.3.1, Google Colab
Checklist
The text was updated successfully, but these errors were encountered: