Skip to content

Add test for MultiIndex Construction with pd.NA #31883

Closed
devjeetr/pandas
#1
@WillAyd

Description

@WillAyd

Discovered in #31799

>>> pd.MultiIndex.from_product([np.array([0., np.nan], dtype="object"), ["a", "B"]])
MultiIndex([(0.0, 'a'),
            (0.0, 'B'),
            (nan, 'a'),
            (nan, 'B')],
           )
>>> pd.MultiIndex.from_product([np.array([0., pd.NA], dtype="object"), ["a", "B"]])
*** TypeError: boolean value of NA is ambiguous

May be the same root cause as #31881

Metadata

Metadata

Assignees

Labels

ConstructorsSeries/DataFrame/Index/pd.array ConstructorsMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateMultiIndexNeeds TestsUnit test(s) needed to prevent regressionsgood first issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions