3391a348f3f7cd07a96c8e6a4b05e3e9f60c8567,pandas/tests/frame/apply/test_frame_apply.py,TestDataFrameApply,test_apply_dict,#TestDataFrameApply#,561

Before Change


            [dict([(0, "foo"), (1, "spam")]), dict([(0, "bar"), (1, "eggs")])]
        )
        B = DataFrame([[0, 1], [2, 3]])
        B_dicts = Series([dict([(0, 0), (1, 2)]), dict([(0, 1), (1, 3)])])
        fn = lambda x: x.to_dict()

        for df, dicts in [(A, A_dicts), (B, B_dicts)]:
            reduce_true = df.apply(fn, result_type="reduce")

After Change



        // GH 8735
        A = DataFrame([["foo", "bar"], ["spam", "eggs"]])
        A_dicts = Series([{0: "foo", 1: "spam"}, {0: "bar", 1: "eggs"}])
        B = DataFrame([[0, 1], [2, 3]])
        B_dicts = Series([{0: 0, 1: 2}, {0: 1, 1: 3}])
        fn = lambda x: x.to_dict()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pandas-dev/pandas
Commit Name: 3391a348f3f7cd07a96c8e6a4b05e3e9f60c8567
Time: 2020-11-26
Author: fangchen.li@outlook.com
File Name: pandas/tests/frame/apply/test_frame_apply.py
Class Name: TestDataFrameApply
Method Name: test_apply_dict


Project Name: pmorissette/bt
Commit Name: 197a7f917dfc540b59f6f1b5c397c89c05436eb9
Time: 2020-11-05
Author: pascal.i.tomecek@jpmorgan.com
File Name: tests/test_backtest.py
Class Name:
Method Name: test_Results_helper_functions_fi


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 3526a6d7d5005d0cb126a39c894ad7f46b441260
Time: 2018-11-17
Author: jcastaldo08@gmail.com
File Name: category_encoders/one_hot.py
Class Name: OneHotEncoder
Method Name: generate_mapping