Skip to content

[Python] Pandas integration TestConvertMetadata.test_table_column_subset_metadata fails with nightlies pandas #49933

@raulcd

Description

@raulcd

Describe the bug, including details regarding any error messages, version, and platform.

CI nightly jobs for pandas and numpy nightly/devel:

have been failing with the following test failure for approximately 1 week:

____________ TestConvertMetadata.test_table_column_subset_metadata _____________

self = <pyarrow.tests.test_pandas.TestConvertMetadata object at 0x7f7bbc3253e0>

    def test_table_column_subset_metadata(self):
        # ARROW-1883
        # non-default index
        for index in [
                pd.Index(['a', 'b', 'c'], name='index'),
                pd.date_range("2017-01-01", periods=3, tz='Europe/Brussels')]:
            df = pd.DataFrame({'a': [1, 2, 3],
                               'b': [.1, .2, .3]}, index=index)
            table = pa.Table.from_pandas(df)
    
            table_subset = table.remove_column(1)
            result = table_subset.to_pandas()
            expected = df[['a']]
            if isinstance(df.index, pd.DatetimeIndex):
                df.index.freq = None
>           tm.assert_frame_equal(result, expected)
E           AssertionError: (None, <Day>)

Component(s)

Python

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions