-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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 issue in preserving index name on empty DataFrame #36532
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm @jorisvandenbossche
thanks @Dr-Irv |
@meeseeksdev backport to 1.1.x |
df["series"] = series | ||
expected = pd.DataFrame( | ||
{"series": [1.23] * 4}, index=pd.RangeIndex(4, name="series_index") | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you forgor the assert here ;)
(thanks for the PR for the rest!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> #36546
… on empty DataFrame
…DataFrame (#36545) Co-authored-by: Irv Lustig <irv@princeton.com>
tests/indexing/test_partial.py:tesst_index_name_empty
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff