influxdata / influxdata/influxdb-client-python
Pandas outputs warning when calling dataframe.append in flux_csv_parser._prepare_data_frame
- 主要言語
- Python
- スター
- 793
- フォーク
- 186
- 平均マージ
- 3時間 2分
- マージ済み PR(30日)
- 1
説明
### Specifications
* Client Version: 1.36.0
* InfluxDB Version: 2.7
### Code sample to reproduce problem
```python
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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
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 の本文から書いたものです。
評価
- 技術スタック
- pandas, python
- 領域
- data
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 68/100