Skip to content

Regression in 2.8.0: StringDtype columns #208

@nicoddemus

Description

@nicoddemus

Since 2.8.0 the following case no longer works:

def test_string_dtype(dataframe_regression):
    df = pd.DataFrame(
        {
            "name": pd.Series(["Alice", "Bob", "Charlie"], dtype="string"),
            "age": [25, 30, 35],
            "city": pd.Series(["New York", "London", "Paris"], dtype="string"),
        }
    )
    dataframe_regression.check(df)
E       AssertionError: Only numeric data/datatime objects are supported on dataframe_regression fixture.
E         Array with type 'string' was given.
E       assert 'O' not in ['m', 'O', 'S', 'U', 'V']
E        +  where 'O' = string[python].kind
E        +    where string[python] = 0      Alice\n1        Bob\n2    Charlie\nName: name, dtype: string.dtype

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions