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

REF: Use default_index or preserve original Index type for empty-like results #59035

Merged
merged 6 commits into from
Jun 18, 2024

Conversation

mroeschke
Copy link
Member

Since DataFrame and Series more consistently return RangeIndex for empty-like constructors since 2.0, this PR uses
default_index(0) more consistently internally

@mroeschke mroeschke added the Index Related to the Index class or subclasses label Jun 17, 2024
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rhshadrach rhshadrach added the Refactor Internal refactoring of code label Jun 17, 2024
@rhshadrach rhshadrach added this to the 3.0 milestone Jun 17, 2024
@mroeschke mroeschke merged commit 849016c into pandas-dev:main Jun 18, 2024
49 of 51 checks passed
@mroeschke mroeschke deleted the ref/default_index/empty branch June 18, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Index Related to the Index class or subclasses Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API should empty ._get_bool_data have RangeIndex?
2 participants