Skip to content
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

[FIX] Add MultiIndex support #175

Merged
merged 5 commits into from
Jan 5, 2024
Merged

[FIX] Add MultiIndex support #175

merged 5 commits into from
Jan 5, 2024

Conversation

m-marqx
Copy link
Contributor

@m-marqx m-marqx commented Dec 21, 2023

One thing I recently noticed is that when a dataframe has MultiIndex columns, the method corr_interactive_plot always results in a dataframe with missing labels:

bug

This error occurs with this method because Plotly struggles with dataframes that have MultiIndex columns. This fix should resolve the missing labels problem by merging the MultiIndex into a list, following the Seaborn format seen in corr_plot, to maintain the graph styles.

With this fix:

fix

I don't know if this change creates a bug with dataframes that have a MultiIndex index, resulting in an error or a bugged plot, but I can't imagine a real situation where a dataframe would have MultiIndex indexes. However, MultiIndex columns could be possible in very specific situations.

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

codecov bot commented Dec 26, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (6328744) 51.18% compared to head (de59319) 50.58%.
Report is 2 commits behind head on main.

Files Patch % Lines
src/klib/describe.py 14.28% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
- Coverage   51.18%   50.58%   -0.60%     
==========================================
  Files           3        3              
  Lines         508      514       +6     
  Branches       68       72       +4     
==========================================
  Hits          260      260              
- Misses        242      248       +6     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@akanz1 akanz1 merged commit feed65f into akanz1:main Jan 5, 2024
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants