Skip to content

CI: failing numpy_dev 3.8 build #40144

Closed
@jreback

Description

@jreback

https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=55190&view=logs&j=eab14f69-13b6-5db7-daeb-7b778629410b&t=ce687173-08c6-5301-838d-71b2dda24510

__________________ TestGroupby.test_groupby_apply_identity ____________________
[gw0] linux -- Python 3.8.8 /home/vsts/miniconda3/envs/pandas-dev/bin/python

>   raise TypeError("boolean value of NA is ambiguous")
E   TypeError: boolean value of NA is ambiguous

pandas/_libs/missing.pyx:436: TypeError

The above exception was the direct cause of the following exception:

self = <pandas.tests.extension.test_boolean.TestGroupby object at 0x7f9eb07e2bb0>
data_for_grouping = <BooleanArray>
[True, True, <NA>, <NA>, False, False, True]
Length: 7, dtype: boolean

    def test_groupby_apply_identity(self, data_for_grouping):
        df = pd.DataFrame({"A": [1, 1, 2, 2, 3, 3, 1], "B": data_for_grouping})
        result = df.groupby("A").B.apply(lambda x: x.array)
        expected = pd.Series(
            [
                df.B.iloc[[0, 1, 6]].array,
                df.B.iloc[[2, 3]].array,
                df.B.iloc[[4, 5]].array,
            ],
            index=pd.Index([1, 2, 3], name="A"),
            name="B",
        )
>       self.assert_series_equal(result, expected)

pandas/tests/extension/test_boolean.py:335: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous IntegrationGroupbyTestingpandas testing functions or related to the test suiteUpstream issueIssue related to pandas dependency

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions