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

Before Change



        // GH 8735
        A = DataFrame([["foo", "bar"], ["spam", "eggs"]])
        A_dicts = Series(
            [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()

After Change


        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()

        for df, dicts in [(A, A_dicts), (B, B_dicts)]:
            reduce_true = df.apply(fn, result_type="reduce")
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: scikit-learn-contrib/categorical-encoding
Commit Name: b5034279b48ae96ffdd4714f96e0f62b0f4807fc
Time: 2018-10-26
Author: jcastaldo08@gmail.com
File Name: category_encoders/ordinal.py
Class Name: OrdinalEncoder
Method Name: ordinal_encoding


Project Name: lmcinnes/umap
Commit Name: e3484057fd9ebc37ce546a65470a7ed26b7888e4
Time: 2018-06-19
Author: leland.mcinnes@gmail.com
File Name: examples/plot_fashion-mnist_example.py
Class Name:
Method Name: