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: