Skip to content

MultiIndex.from_product() should accept Index or Series as arguments #1249

Open
@Dr-Irv

Description

@Dr-Irv

Describe the bug
MultiIndex.from_product() should accept Index or Series as arguments

To Reproduce

import pandas as pd

mi = pd.MultiIndex.from_product([["x", "y"], df.columns])
mi = pd.MultiIndex.from_product([["x", "y"], pd.Series([1, 2])])

Both of the above don't get past pyright.

Please complete the following information:

  • OS: Windows 11
  • python version: 3.10
  • pyright 1.1.400
  • in the dev copy

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions