Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#570 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@dweindl ci sta già lavorando.

Dal 22/10/2026.

  • #571 di @dweindl — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
Python
Stelle
18
Fork
9
Merge medio
1g 8h
PR unite (30g)
21

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PEtab-dev/libpetab-python

Tutte le issue di PEtab-dev/libpetab-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.