50837ed17dbd9e74af2f01a3255cf3148ead1f4a,sklearn/sklearn-template/template/trainer/utils.py,,read_df_from_gcs,#,79

Before Change


  blobs = bucket.list_blobs(prefix=file_pattern)

  for blob in blobs:
    file_path = temp_folder + blob.name.split("/")[-1]
    blob.download_to_filename(file_path)
    // Assume there is no header
    df_list.append(pd.read_csv(file_path, header=None))
    // TODO: Can remove after download to save space

After Change


  df_list = []

  for file in gfile.Glob(file_pattern):
    with gfile.Open(file, "r") as f:
      // Assume there is no header
      df_list.append(pd.read_csv(f, header=None))

  data_df = pd.concat(df_list)

  return data_df
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: GoogleCloudPlatform/cloudml-samples
Commit Name: 50837ed17dbd9e74af2f01a3255cf3148ead1f4a
Time: 2019-04-03
Author: luoshixin@google.com
File Name: sklearn/sklearn-template/template/trainer/utils.py
Class Name:
Method Name: read_df_from_gcs


Project Name: Microsoft/MMdnn
Commit Name: e3dbf30b449033ee584159dc0e462741d4e0e15b
Time: 2020-07-31
Author: 50827462+XiaoXYe@users.noreply.github.com
File Name: mmdnn/conversion/pytorch/pytorch_graph.py
Class Name: PytorchGraph151
Method Name: extractgraph


Project Name: osmr/imgclsmob
Commit Name: d9f6e28568406c162b79f582ae037a89a3118d26
Time: 2021-02-16
Author: osemery@gmail.com
File Name: prep_model.py
Class Name:
Method Name: post_process