Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[protocol] Clarify the exact meaning of the buffer's dtype (Dtype tuple in get_buffers())

オープン
#273 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

@pitrou がすでに取り組んでいます。

2023年10月3日 から。

  • #272 @pitrou による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
ドキュメント
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
api, data

調査の方向性

まず、issue で引用されているプロトコルの文言を読み、tests/test_column_object.py と比較します。特に dataframe-interchange-tests の test_dtype と test_get_buffers を確認してください。Buffer に関連付けられた dtype が Column.dtype と一致すべきなのか、それとも異なっていてもよいのかを明確にし、意味が確定したら仕様と対応するテストの期待値を更新します。

索引モデルが issue の本文から書いたものです。

説明

interchange-protocol

If my assumption is incorrect

Just as a sanity check I checked and pandas/vaex/cuDF/modin all return the type described in Column.dtype for the get_buffers() values. A. TODO I realize for dataframe-interchange-tests is generalise test_dtype and use it in test_get_buffers.

Note that this is actually not correct, depending on how you interpret it. Yes, the buffers' dtype returns a similar type of DType tuple, but it should not necessarily return the same dtype tuple as its Column.dtype does, as the buffer can have a different dtype than the column.

It seems that we all interpreted this wrongly and all implementations got this wrong (or the text about "the data buffer's associated dtype" is wrong), see https://github.com/apache/arrow/issues/37598, https://github.com/pandas-dev/pandas/issues/54781, https://github.com/pola-rs/polars/pull/10787 (and the same for StaticFrame mentioned above, from a quick look).

Originally posted by @jorisvandenbossche in https://github.com/data-apis/dataframe-api/issues/87#issuecomment-1744791104

主要言語
Python
スター
106
フォーク
22
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

data-apis/dataframe-api のほかの issue

data-apis/dataframe-api の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。