Add dunder method for Arrow C Data Interface to DataFrame and Column objects
まだ誰も着手していません。
評価
調査の方向性
参照されている PyCapsule C Data Interface のドキュメントと、issues 250 および 48 の DataFrame interchange に関する議論を読みます。次に、DataFrame および Column interchange オブジェクトの定義を確認します。両方のオブジェクトについて、マルチチャンクの動作を含め、プロトコルの決定とオプションの Arrow メソッドが一貫して仕様化されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The Python Arrow community is adding a public way to interchange data through the C Data Interface, using PyCapsule objects holding the C struct, similary as DLPack's python interface: http://crossbow.voltrondata.com/pr_docs/37797/format/CDataInterface/PyCapsuleInterface.html
We have DLPack support at the Buffer level, and similarly, I think it would be useful to add Arrow support at the DataFrame and Column level.
Concretely, I would propose adding an optional __arrow_c_schema__, __arrow_c_array__ and __arrow_c_stream__ methods to both the DataFrame and Column interchange objects. Those methods would be optional, with their presence indicating that this specific implementation of the interchange object supports the Arrow interface.
Consumers of the interchange protocol could then check for the presence of those methods, and try them first for an easier and faster conversion, and otherwise use the standard APIs through the Column and Buffer objects (example: pyarrow and polars interchanging data).
It might be a bit strange to add both the array and stream interface methods, but that is due to that the interchange protocol hasn't really made a distinction between a single chunk vs a chunked object (https://github.com/data-apis/dataframe-api/issues/250). But I think the array method could then raise an error if the DataFrame or Column still exists of more than 1 chunk.
This would address https://github.com/data-apis/dataframe-api/issues/48 but without being tied to a specific library implementation, but solely memory layout.
- 主要言語
- Python
- スター
- 106
- フォーク
- 22
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
data-apis/dataframe-api のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
data-apis/dataframe-api#363 · コメント 1 件 · リアクション 8 件 ·
-
API design
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
data-apis/dataframe-api#356 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
data-apis/dataframe-api#355 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
data-apis/dataframe-api#352 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
data-apis/dataframe-api#351 ·
data-apis/dataframe-api の issue をすべて見る
似ている issue
-
Performance: deprecated DeviceEntry.config_entries access blocks the event loop for tens of secondsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
tuya/tuya_cloud_ha_bridge#14 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
semantica-agi/semantica#1968 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
agent: ready area: submission priority: high type: docs
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dkritarth/scopewatch#213 ·
メンテナーはふだん 1 日以内に返信
-
Broken link in RELEASE.md対応中かも @Jah-yee が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
sphinx-contrib/httpdomain#143 ·
メンテナーはふだん 1 日以内に返信