132c183f48604a1f32f553691f61b9d0eec93556,petastorm/arrow_reader_worker.py,ArrowReaderWorker,_load_rows,#ArrowReaderWorker#Any#Any#Any#,148

Before Change


        result = self._read_with_shuffle_row_drop(piece, pq_file, column_names, shuffle_row_drop_range)

        if self._transform_spec:
            result = pa.Table.from_pandas(self._transform_spec.func(result.to_pandas()), preserve_index=False)

        return result

After Change


        result = self._read_with_shuffle_row_drop(piece, pq_file, column_names, shuffle_row_drop_range)

        if self._transform_spec:
            result_as_pandas = result.to_pandas()
            // A user may omit `func` value if they intend just to delete some fields using the TransformSpec
            if self._transform_spec.func:
                transformed_result = self._transform_spec.func(result_as_pandas)
            else:
                transformed_result = result_as_pandas

            // If transform function left a field that is listed in transform_spec"s remove_fields, we remove it
            // ourselves. Allows for the following transform-spec objects to be created:
            // TransformSpec(removed_fields=["some field"])
            for field_to_remove in set(transformed_result.columns) & set(self._transform_spec.removed_fields):
                del transformed_result[field_to_remove]

            result = pa.Table.from_pandas(transformed_result, preserve_index=False)

        return result

    def _load_rows_with_predicate(self, pq_file, piece, worker_predicate, shuffle_row_drop_partition):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 4

Instances


Project Name: uber/petastorm
Commit Name: 132c183f48604a1f32f553691f61b9d0eec93556
Time: 2019-08-27
Author: yevgeni@uber.com
File Name: petastorm/arrow_reader_worker.py
Class Name: ArrowReaderWorker
Method Name: _load_rows


Project Name: pfnet/optuna
Commit Name: 18f729a0eb27459058522661320671e2351fbcf7
Time: 2018-05-01
Author: t.akiba.65536@gmail.com
File Name: tests/test_study.py
Class Name: Func
Method Name: __call__


Project Name: pyannote/pyannote-audio
Commit Name: d6b449edcbdaf559807aaff6bd3234f47134e303
Time: 2017-05-11
Author: bredin@limsi.fr
File Name: pyannote/audio/embedding/approaches/center_loss.py
Class Name: CenterLoss
Method Name: loss_and_grad


Project Name: Bihaqo/t3f
Commit Name: fb43d1f4a64b77f8b64134460b0c77cb5f79e185
Time: 2018-10-31
Author: sasha.v.novikov@gmail.com
File Name: t3f/autodiff.py
Class Name:
Method Name: gradients


Project Name: riga/tfdeploy
Commit Name: 374c26d2c01a7a07078e398542faae0ae55c1014
Time: 2016-03-11
Author: marcelrieger@me.com
File Name: tfdeploy.py
Class Name: Operation
Method Name: eval


Project Name: scikit-optimize/scikit-optimize
Commit Name: 4af750bec058da0cf5d4a3245a443549b9d7fd33
Time: 2016-04-05
Author: manojkumarsivaraj334@gmail.com
File Name: skopt/dummy_opt.py
Class Name:
Method Name: dummy_minimize