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

pandas level-dropping for empty columns in multi-index dataframe #41

Open
rizac opened this issue Nov 16, 2023 · 0 comments
Open

pandas level-dropping for empty columns in multi-index dataframe #41

rizac opened this issue Nov 16, 2023 · 0 comments
Labels
discussion issue is actually meant to start a discussion

Comments

@rizac
Copy link
Owner

rizac commented Nov 16, 2023

For reference:

pandas-dev/pandas#11424

The URL above describes a non-documented feature that allows flexible depths in indexes. E.g.:

   "PGA"       "mag"
   "model"            # <- empty string under "mag"
0  0.52357   0.295221
1  0.108467  0.772837
2  0.29988   0.547574
>>> type(df['PGA'])
<class 'pandas.core.frame.DataFrame'>

>>> type(df['mag'])
<class 'pandas.core.series.Series'>
@rizac rizac added the discussion issue is actually meant to start a discussion label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion issue is actually meant to start a discussion
Projects
None yet
Development

No branches or pull requests

1 participant