From 9572e43fc988438a40b32afbb49892fe78533e65 Mon Sep 17 00:00:00 2001 From: Alex Merose Date: Sun, 13 Jul 2025 13:38:56 -0700 Subject: [PATCH] Updated type and example in README. --- README.md | 4 ++-- xarray_sql/df.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 421aee77..3747b98a 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,8 @@ df = c.sql(''' # A table of the average temperature for each location across time. df.to_pandas() -# Alternatively, you can just create the DataFrame from the Dataset: -df = qr.read_xarray(ds).to_pandas() +# Alternatively, you can just create the DataFrame from the RecordBatchReader: +df = qr.read_xarray(ds).read_pandas() df.head() ``` diff --git a/xarray_sql/df.py b/xarray_sql/df.py index 2e941b88..8b700add 100644 --- a/xarray_sql/df.py +++ b/xarray_sql/df.py @@ -150,7 +150,7 @@ def pivot(ds: xr.Dataset) -> pd.DataFrame: return ds.to_dataframe().reset_index() -def read_xarray(ds: xr.Dataset, chunks: Chunks = None) -> ArrowStreamExportable: +def read_xarray(ds: xr.Dataset, chunks: Chunks = None) -> pa.RecordBatchReader: """Pivots an Xarray Dataset into a PyArrow Table, partitioned by chunks. Args: