13a97c235dc6e131bd54f1ba91f4ac4cb32b0421,pandas/tests/indexing/test_categorical.py,TestCategoricalIndex,test_loc_scalar,#TestCategoricalIndex#,39

Before Change



        msg = ""fill_value=d" is not present in this Categorical"s categories"
        with pytest.raises(TypeError, match=msg):
            df.loc["d", "A"] = 10
        with pytest.raises(TypeError, match=msg):
            df.loc["d", "C"] = 10

        with pytest.raises(KeyError, match="^1$"):

After Change


    def test_loc_scalar(self):
        dtype = CDT(list("cab"))
        result = self.df.loc["a"]
        bidx = Series(list("aaa"), name="B").astype(dtype)
        assert bidx.dtype == dtype

        expected = DataFrame({"A": [0, 1, 5]}, index=Index(bidx))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pandas-dev/pandas
Commit Name: 13a97c235dc6e131bd54f1ba91f4ac4cb32b0421
Time: 2021-03-02
Author: jbrockmendel@gmail.com
File Name: pandas/tests/indexing/test_categorical.py
Class Name: TestCategoricalIndex
Method Name: test_loc_scalar


Project Name: bashtage/linearmodels
Commit Name: 31aa6d413fecf5b2b37a742ab16dcc08277f3d84
Time: 2017-04-03
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/panel/results.py
Class Name: PanelResults
Method Name: resid


Project Name: bashtage/linearmodels
Commit Name: 31aa6d413fecf5b2b37a742ab16dcc08277f3d84
Time: 2017-04-03
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/panel/results.py
Class Name: PanelResults
Method Name: wresid