Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

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

未關閉
#570 0 則留言 0 個 reaction 已指派 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 天 8 小時
30 天內合併 PR
21

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

PEtab-dev/libpetab-python 的其他 Issue

查看 PEtab-dev/libpetab-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。