Pandas outputs warning when calling dataframe.append in flux_csv_parser._prepare_data_frame

オープン 初心者向け
#613 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
pandas, python
領域
data

調査の方向性

influxdb_client/client/flux_csv_parser.py の243-256行付近で、query_data_frame が dataframe を構築している箇所から始め、query_api.query_data_frame(query) で警告を再現してください。pandas issue 39122 で説明されている pandas の連結に関する変更と動作を比較してください。query が報告された FutureWarning なしで実行されれば完了です。

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

説明

bug
Specifications
  • Client Version: 1.36.0
  • InfluxDB Version: 2.7
Code sample to reproduce problem
query_api.query_data_frame(query)
Expected behavior

The query should be executed without warnings.

Actual behavior

Pandas outputs a FutureWarning:

/usr/local/lib/python3.11/site-packages/influxdb_client/client/flux_csv_parser.py:256: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.

This is related to the this code snippet:

https://github.com/influxdata/influxdb-client-python/blob/aa6e5c4aad1aaf004195c175ebe424ac6040c2e3/influxdb_client/client/flux_csv_parser.py#L243C9-L256

Additional info

In the recent pandas version handling of concatenation of empty dataframes changed, see https://github.com/pandas-dev/pandas/issues/39122. This should be handled else wise to reflect the changes in pandas.

主要言語
Python
スター
792
フォーク
186
平均マージ
3時間 2分
マージ済み PR(30日)
1

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

influxdata/influxdb-client-python のほかの issue

influxdata/influxdb-client-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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