Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
```

Expand Down
2 changes: 1 addition & 1 deletion xarray_sql/df.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down