def csv_dataset_same_file(context): context.read_csv_path = create_sample_csv() context.write_csv_path = context.read_csv_path context.csv_data_set = LambdaDataSet( load=lambda: pd.read_csv(context.read_csv_path), save=lambda df: df.to_csv(context.write_csv_path, index=False), )
def define_dataset_with_load_save(context): context.read_csv_path = create_sample_csv() context.write_csv_path = create_temp_csv() context.csv_data_set = LambdaDataSet( load=lambda: pd.read_csv(context.read_csv_path), save=lambda df: df.to_csv(context.write_csv_path), )
def prepare_csv_data_with_tabs(context): context.read_csv_path = create_sample_csv() context.write_csv_path = create_temp_csv() context.csv_data_set = CSVLocalDataSet( filepath=context.read_csv_path, load_args={"sep": "\t"}, save_args={"index": False, "sep": "\t"}, )
def prepare_csv_data(context): context.read_csv_path = create_sample_csv() context.write_csv_path = create_temp_csv() context.csv_data_set = CSVLocalDataSet(filepath=context.read_csv_path)