Skip to content

Commit 56f75fe

Browse files
authored
Converting pandas index takes very long, add in arrow_table. (#41)
* Converting pandas index takes very long, add in arrow_table. * Bump pyproject toml version number for pip build.
1 parent 8a3788f commit 56f75fe

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

btrdb/transformers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,7 @@ def arrow_to_dataframe(
224224
tmp = tmp_table.select(["time", *usable_cols])
225225
else:
226226
tmp = tmp_table
227-
df = tmp.to_pandas(date_as_object=False, types_mapper=pd.ArrowDtype)
228-
df = df.set_index("time")
229-
df.index = pd.DatetimeIndex(df.index, tz="UTC")
230-
return df
227+
return tmp.to_pandas(date_as_object=False, types_mapper=pd.ArrowDtype)
231228

232229

233230
def to_dataframe(streamset, columns=None, agg="mean", name_callable=None):
@@ -668,5 +665,7 @@ class StreamSetTransformer(object):
668665
to_polars = to_polars
669666
arrow_to_polars = arrow_to_polars
670667

668+
arrow_to_arrow_table = arrow_to_arrow_table
669+
671670
to_csv = to_csv
672671
to_table = to_table

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "btrdb"
3-
version = "5.30.1"
3+
version = "5.30.2"
44
authors = [
55
{name="PingThingsIO", email="support@pingthings.io"},
66
]

0 commit comments

Comments
 (0)