def __init__(self, file1_path, file1_filename, file2_path, file2_filename): self.file1 = CSVReader(file1_path, file1_filename) self.file2 = CSVReader(file2_path, file2_filename) self.file1_first_data_row = CSVReader.first_data_row(file1_path, file1_filename) self.file2_first_data_row = CSVReader.first_data_row(file2_path, file2_filename) assert(self.file1_first_data_row == self.file2_first_data_row)
def __init__(self, script_path, input_path, input_filename): self.script_path = script_path self.input_path = input_path self.input_filename = input_filename self.filename_path = input_path + "/" + input_filename self.first_data_row = CSVReader.first_data_row(input_path, input_filename)
def csv_row_count(cls, input_path, input_filename): csv = CSVReader(input_path, input_filename) csv.close() header_rows = CSVReader.first_data_row(input_path, input_filename) + 1 return csv.total_lines - header_rows