22007d3fd294033132be4fffb0fbdd10c8dd46de,pandas/tests/reshape/concat/test_categorical.py,TestCategoricalConcat,test_categorical_index_preserver,#TestCategoricalConcat#,123

Before Change


        df3 = DataFrame(
            {"A": a, "B": Categorical(b, categories=list("abe"))}
        ).set_index("B")
        msg = "categories must match existing categories when appending"
        with pytest.raises(TypeError, match=msg):
            pd.concat([df2, df3])

    def test_concat_categorical_tz(self):
        // GH-23816
        a = Series(pd.date_range("2017-01-01", periods=2, tz="US/Pacific"))
        b = Series(["a", "b"], dtype="category")

After Change


            {"A": a, "B": Categorical(b, categories=list("abe"))}
        ).set_index("B")
        result = pd.concat([df2, df3])
        expected = pd.concat(
            [
                df2.set_axis(df2.index.astype(object), 0),
                df3.set_axis(df3.index.astype(object), 0),
            ]
        )
        tm.assert_frame_equal(result, expected)

    def test_concat_categorical_tz(self):
        // GH-23816
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: pandas-dev/pandas
Commit Name: 22007d3fd294033132be4fffb0fbdd10c8dd46de
Time: 2020-11-29
Author: jbrockmendel@gmail.com
File Name: pandas/tests/reshape/concat/test_categorical.py
Class Name: TestCategoricalConcat
Method Name: test_categorical_index_preserver


Project Name: pandas-dev/pandas
Commit Name: 839c1bd682591341a1be1018b0fac97facff73d0
Time: 2021-01-09
Author: jbrockmendel@gmail.com
File Name: pandas/tests/indexes/interval/test_interval.py
Class Name: TestIntervalIndex
Method Name: test_append


Project Name: pandas-dev/pandas
Commit Name: f2ff676169c6f2aca04eebe22e5d31501f8a2a6b
Time: 2021-02-10
Author: jbrockmendel@gmail.com
File Name: pandas/tests/indexes/datetimelike.py
Class Name: DatetimeLike
Method Name: test_where_cast_str


Project Name: pandas-dev/pandas
Commit Name: 13a97c235dc6e131bd54f1ba91f4ac4cb32b0421
Time: 2021-03-02
Author: jbrockmendel@gmail.com
File Name: pandas/tests/indexes/categorical/test_category.py
Class Name: TestCategoricalIndex
Method Name: test_insert