def all_values(): """Emit all values for debugging to_float()""" csv_path = files.get_path_csv() for table in parse.Tables(csv_path).get_all(): for row in table.datarows: for value in row.data: yield value
def __init__(self, year, month): self.year, self.month = files.filter_date(year, month) # get csv source self.csv_path = files.get_path_csv(year, month) # break csv to tables with variable names self.tables = Tables(self.csv_path).get_defined() # emit values from tables self.dpoints = Datapoints(self.tables) # convert stream values to pandas dataframes self.frames = Frames(datapoints=self.dpoints)
def test_csv_has_no_null_byte(): csv_path = files.get_path_csv(2015, 2) z = csv_path.read_text(encoding=parse.ENC) assert "\0" not in z
def all_heads(): # emit all heads for debugging get_year() csv_path = files.get_path_csv() csv_dicts = parse.read_csv(csv_path) for d in csv_dicts: yield d.name