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

Deprecation warnings with pandas 3.1 (`inplace`, `read_csv(float_precision=...)`)

クローズ
#570 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

2026年10月22日 から。

  • #571 @dweindl による — マージ済み

評価

この issue はまだ評価されていません。

説明

pandas 3.1.0 deprecates the inplace keyword of drop, rename, reset_index, set_index, sort_index, sort_values and others (PDEP-8), and the float_precision argument of read_csv. Both emit Pandas4Warning (a DeprecationWarning subclass) and will stop working in pandas 4.

petab uses both when loading any PEtab table, so every Problem.from_yaml warns. Downstream test suites that turn warnings into errors fail (e.g., AMICI, see AMICI-dev/AMICI#3440).

Affected places on main (68be6d1):

  • read_csv(..., float_precision="round_trip"): v1/conditions.py, v1/core.py (2×), v1/mapping.py, v1/measurements.py, v1/observables.py, v1/parameters.py, v2/conditions.py, v2/experiments.py
  • reset_index(inplace=True) / set_index(..., inplace=True): v1/conditions.py, v1/mapping.py, v1/observables.py, v1/parameters.py (incl. l. 243), v1/simplify.py
  • sort_index(inplace=True): v1/visualize/plotting.py (2×)
  • rename(..., inplace=True) / drop(..., inplace=True): v2/petab1to2.py (5×)

(fillna(..., inplace=True) in v1/visualize/lint.py and v2/petab1to2.py is not affected.)

The inplace uses can be replaced by re-assignments. For float_precision, pandas 3.1 uses the same (improved) converter for all precision modes (pandas#64395), but older pandas versions don't parse round-trip by default. So the argument should probably only be passed for pandas < 3.1.

🤖 Generated with Claude Code

主要言語
Python
スター
18
フォーク
9
平均マージ
1日 21時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

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

PEtab-dev/libpetab-python のほかの issue

PEtab-dev/libpetab-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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