Skip to content

BUG: Fix read_csv MultiIndex empty value handling (#59560) #60487

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

Conversation

brandonmonge
Copy link

  • closes BUG: inconsistency when read_csv reads MultiIndex with empty values #59560 (Fixes inconsistency in read_csv handling of MultiIndex with empty values)

  • Tests added and passed
    Added test_multiindex_empty_values_handling in pandas/tests/io/parser/test_index_col.py to validate that read_csv correctly handles MultiIndex with empty values, leaving them as empty strings instead of replacing them with "Unnamed: ...".
    All relevant tests passed successfully.

  • All code checks passed.

  • Added type annotations to new arguments/methods/functions.

  • Added an entry in the latest doc/source/whatsnew/v3.0.0.rst file if fixing a bug or adding a new feature.
    Updated the MultiIndex section with the following entry:

    ```rst
    - :func:`read_csv` now properly handles MultiIndex with empty values by leaving them as empty strings, ensuring consistency in index and column handling (:issue:`59560`).
    ```
    

@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Dec 29, 2024
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.

BUG: inconsistency when read_csv reads MultiIndex with empty values
2 participants