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

Automatic PR for 065bc235-49b8-40be-975a-3f78ef362547 #100

Open
wants to merge 1 commit into
base: 065bc235-49b8-40be-975a-3f78ef362547-base
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions pandas/tests/frame/methods/test_reset_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,19 +772,4 @@ def test_errorreset_index_rename(float_frame):
stacked_df.reset_index(names={"first": "new_first", "second": "new_second"})

with pytest.raises(IndexError, match="list index out of range"):
stacked_df.reset_index(names=["new_first"])


def test_reset_index_false_index_name():
result_series = Series(data=range(5, 10), index=range(0, 5))
result_series.index.name = False
result_series.reset_index()
expected_series = Series(range(5, 10), RangeIndex(range(0, 5), name=False))
tm.assert_series_equal(result_series, expected_series)

# GH 38147
result_frame = DataFrame(data=range(5, 10), index=range(0, 5))
result_frame.index.name = False
result_frame.reset_index()
expected_frame = DataFrame(range(5, 10), RangeIndex(range(0, 5), name=False))
tm.assert_frame_equal(result_frame, expected_frame)
stacked_df.reset_index(names=["new_first"])