From d4ec6379cfdf3506a09275485f68d545f3f886df Mon Sep 17 00:00:00 2001 From: Justin Gilmer Date: Mon, 24 Jul 2023 12:01:53 -0400 Subject: [PATCH 1/2] Converting pandas index takes very long, add in arrow_table. --- btrdb/transformers.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/btrdb/transformers.py b/btrdb/transformers.py index 4939215..9bcf7b5 100644 --- a/btrdb/transformers.py +++ b/btrdb/transformers.py @@ -224,10 +224,7 @@ def arrow_to_dataframe( tmp = tmp_table.select(["time", *usable_cols]) else: tmp = tmp_table - df = tmp.to_pandas(date_as_object=False, types_mapper=pd.ArrowDtype) - df = df.set_index("time") - df.index = pd.DatetimeIndex(df.index, tz="UTC") - return df + return tmp.to_pandas(date_as_object=False, types_mapper=pd.ArrowDtype) def to_dataframe(streamset, columns=None, agg="mean", name_callable=None): @@ -668,5 +665,7 @@ class StreamSetTransformer(object): to_polars = to_polars arrow_to_polars = arrow_to_polars + arrow_to_arrow_table = arrow_to_arrow_table + to_csv = to_csv to_table = to_table From 7f7b5f969484fb8071bfbe650e7515c5dab81629 Mon Sep 17 00:00:00 2001 From: Justin Gilmer Date: Mon, 24 Jul 2023 12:24:10 -0400 Subject: [PATCH 2/2] Bump pyproject toml version number for pip build. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c92415..f42ddf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "btrdb" -version = "5.30.1" +version = "5.30.2" authors = [ {name="PingThingsIO", email="support@pingthings.io"}, ]