pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
42.62k stars 17.57k forks source link

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

Closed mroeschke closed 2 weeks ago

mroeschke commented 2 weeks ago

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