pypsa-meets-earth/pypsa-earth

Address pandas 2.3 deprecations

Open

#1,715 opened on Feb 4, 2026

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Python (349 forks)auto 404
dependencieshelp wanted

Repository metrics

Stars
 (351 stars)
PR merge metrics
 (PR metrics pending)

Description

Describe the feature you'd like to see

pandas 3.0 has been released recently meaning that all deprecations of pandas 2.3 will become errors.

We have two following points to be addressed.

  1. Dedicated string data type by default This deprecation leads to the warning:

clean_osm_data.py:620: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value '['1.0' '1.0' '1.0' '1.0' '1.0' '1.0' '2.0' '2.0' '2.0' '1.0' '2.0' '1.0'

  1. Chained assignment has stopped working Which results in a warning in the solving script:

solve_network.py:661: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.

Contributor guide