Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

read_xarray doesn't work on all xarray datasets

未關閉
#180 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

  • #214 來自 @JHON12091986 —— 已關閉,未合併

評估

難度
3/5
預估耗時
1-2 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
pandas, python
領域
data

研究方向

Start with xarray_sql/reader.py, where XarrayRecordBatchReader.__init__ rejects datasets whose variables have different dimensions, and trace how read_xarray passes options into the reader. Check the closed pull request #214 and the existing reader tests for relevant context. Done means callers can select data variables when reading a dataset with differing dimensions and the behavior is covered by a test.

由索引模型根據 Issue 內容生成。

描述

ds = xr.open_zarr(
  'gs://gcp-public-data-arco-era5/ar/full_37-1h-0p25deg-chunk-1.zarr-v3',
  chunks=None,  # Turn dask off
  storage_options={'token': 'anon'}  # Anonymous read from the public GCS bucket — no auth required.
)
xql.read_xarray(ds)
File ~/repos/xarray-sql/xarray_sql/reader.py:96, in XarrayRecordBatchReader.__init__(self, ds, chunks, batch_size, _iteration_callback)
     94 fst = next(iter(ds.values())).dims
     95 if not all(da.dims == fst for da in ds.values()):
---> [96](https://file+.vscode-resource.vscode-cdn.net/Users/ahuang/repos/xarray-sql/~/repos/xarray-sql/xarray_sql/reader.py:96)     raise ValueError(
     97         "All dimensions must be equal. Please filter data_vars in the Dataset."
     98     )

ValueError: All dimensions must be equal. Please filter data_vars in the Dataset.

So, I tried:

xql.read_xarray(ds, data_vars=["surface"])

But data_vars isn't a kwarg.

Should read_xarray have an option to pass data_vars?

主要語言
Python
星號
142
分支
19
平均合併
1 天 6 小時
30 天內合併 PR
10

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

xqlsystems/xarray-sql 的其他 Issue

查看 xqlsystems/xarray-sql 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。