f1522f7930a7dd101bca96c76db291647d2d5de4,solutionbox/structured_data/mltoolbox/_structured_data/preprocess/local_preprocess.py,,run_numerical_categorical_analysis,#Any#Any#,69

Before Change


  for input_file in input_files:
    with file_io.FileIO(input_file, "r") as f:
      for line in f:
        parsed_line = dict(zip(header, line.strip().split(",")))

        for col_schema in schema_list:
          col_name = col_schema["name"]

After Change


    // label2,count
    // ...
    // where label1 is the most frequent label, and label2 is the 2nd most, etc.
    labels = "\n".join(["%s,%d" % (label, count)
                        for label, count in sorted(six.iteritems(label_count),
                                                   key=lambda x: x[1],
                                                   reverse=True)])
    file_io.write_string_to_file(
        os.path.join(args.output_dir, CATEGORICAL_ANALYSIS_FILE % name),
        labels)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: googledatalab/pydatalab
Commit Name: f1522f7930a7dd101bca96c76db291647d2d5de4
Time: 2017-04-13
Author: brandondutra@google.com
File Name: solutionbox/structured_data/mltoolbox/_structured_data/preprocess/local_preprocess.py
Class Name:
Method Name: run_numerical_categorical_analysis


Project Name: erikbern/ann-benchmarks
Commit Name: b8732f422d71819a250bd33e958766c4a709fbff
Time: 2018-02-24
Author: maau@itu.dk
File Name: create_website.py
Class Name:
Method Name: build_index


Project Name: sony/nnabla-examples
Commit Name: f1fca244a7b6bff0ff66a052b58d3a3798d74ecb
Time: 2020-03-20
Author: Takuya.Narihira@sony.com
File Name: imagenet-classification/create_input_files.py
Class Name:
Method Name: main