This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
input_file_path = 'soccer_clean_flat.csv' | |
output_file_name = 'soccer_clean.csv' | |
f = open(input_file_path) | |
csv_f = csv.reader(f) | |
header = csv_f.next() | |
f2 = open(output_file_name, 'w') | |
f2.write('{},{},{}\n'.format(header[0], header[1], header[2])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
import copy | |
from sklearn import tree | |
import graphviz | |
class Greedy: | |
def __init__(self, set_vlaues, given_tuple, metric): | |
self.given_tuple = given_tuple | |
self.set_vlaues = set_vlaues |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
input_file_path = 'ehr_clean.csv' | |
output_file_name = 'ehr_clean_f.csv' | |
f = open(input_file_path) | |
csv_f = csv.reader(f) | |
rows = [] | |
for row in csv_f: |