FIX-#7633: Support reset_index names without pandas fallback - #7700
Open
puneetdixit200 wants to merge 1 commit into
Open
FIX-#7633: Support reset_index names without pandas fallback#7700puneetdixit200 wants to merge 1 commit into
puneetdixit200 wants to merge 1 commit into
Conversation
…back Signed-off-by: Puneet Dixit <236133619+puneetdixit200@users.noreply.github.com>
puneetdixit200
requested review from
a team,
RehanSD,
YarShev,
anmyachev,
dchigarev,
devin-petersohn,
mvashishtha and
vnlitvinov
as code owners
June 4, 2026 04:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What do these changes do?
This implements native
PandasQueryCompiler.reset_index()support for non-defaultnamesandallow_duplicatesarguments instead of defaulting to pandas.The implementation validates and derives pandas-compatible output columns on an empty frame, then keeps execution on the existing Modin
from_labels()path. Regression coverage checks pandas parity and asserts that these cases do not emit the default-to-pandas warning.AI assistance was used while drafting this patch; I reviewed the diff and verified the results below.
Targeted checks run:
MODIN_ENGINE=python pytest modin/tests/pandas/dataframe/test_indexing.py -q -k 'test_reset_index_with_names_and_allow_duplicates_does_not_default_to_pandas or test_reset_index_with_named_index'black --check modin/core/storage_formats/pandas/query_compiler.py modin/tests/pandas/dataframe/test_indexing.pyflake8 modin/core/storage_formats/pandas/query_compiler.py modin/tests/pandas/dataframe/test_indexing.pygit diff --checkfirst commit message and PR title follow format outlined here
passes
flake8 modin/ asv_bench/benchmarks scripts/doc_checker.pypasses
black --check modin/ asv_bench/benchmarks scripts/doc_checker.pysigned commit with
git commit -sResolves PandasOnRay doesn't implement reset_index for non-default
namesparameter #7633tests added and passing
module layout described at
docs/development/architecture.rstis up-to-date