diff --git a/VERSION b/VERSION index 2774f858..71172b43 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.10.0 \ No newline at end of file +0.10.1 \ No newline at end of file diff --git a/src/gretel_synthetics/batch.py b/src/gretel_synthetics/batch.py index 31ccd0d6..b8601d75 100644 --- a/src/gretel_synthetics/batch.py +++ b/src/gretel_synthetics/batch.py @@ -62,7 +62,7 @@ def synthetic_df(self) -> pd.DataFrame: if not self.gen_data_stream.getvalue(): # pragma: no cover return pd.DataFrame() self.gen_data_stream.seek(0) - return pd.read_csv(self.gen_data_stream) + return pd.read_csv(self.gen_data_stream, sep=self.config.field_delimiter) def set_validator(self, fn: Callable, save=True): """Assign a validation callable to this batch. Optionally diff --git a/tests/test_batch.py b/tests/test_batch.py index 7e8235b4..a43fd123 100644 --- a/tests/test_batch.py +++ b/tests/test_batch.py @@ -163,19 +163,13 @@ def bad(): def test_batches_to_df(test_data): batches = DataFrameBatch(df=pd.DataFrame([ - {"foo": "bar", "foo1": "bar1", "foo2": "bar2", "foo3": 3}]), config=config_template, batch_size=1) + {"foo": "bar", "foo1": "bar1", "foo2": "bar2", "foo3": 3}]), config=config_template, batch_size=2) batches.batches[0].add_valid_data( - gen_text(text="baz", valid=True, delimiter=",") + gen_text(text="baz|baz1", valid=True, delimiter="|") ) batches.batches[1].add_valid_data( - gen_text(text="baz1", valid=True, delimiter=",") - ) - batches.batches[2].add_valid_data( - gen_text(text="baz2", valid=True, delimiter=",") - ) - batches.batches[3].add_valid_data( - gen_text(text="5", valid=True, delimiter=",") + gen_text(text="baz2|5", valid=True, delimiter="|") ) check = batches.batches_to_df()