Skip to content

PandasOnRay doesn't implement reset_index for non-default names parameter #7633

@sfc-gh-vrpatel

Description

@sfc-gh-vrpatel

The PandasQueryCompiler doesn't implement reset_index() for all scenarios. Per the docs, it will default to pandas "when names or allow_duplicates is non-default." This is important because switching backends may require the index to be reset to preserve metadata. Defaulting to pandas would cause performance degradation every time a switch involving the Ray backend occurs.

Example:

import modin.pandas as pd
Backend.put("Ray")
index = pd.Index(["A", "B", "C"], name="index")
df = pd.DataFrame([[1, 2], [3, 4], [5, 6]], index=index)
df.reset_index(names="index") # Since names != None, this will raise a warning

Note:
Logs UserWarning: reset_index is not currently supported by PandasOnRay, defaulting to pandas implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important tasks that we should complete soonbug 🦗Something isn't workinghybrid-execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions