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

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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`).
    ```
    

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
1 participant