optimagic-dev / optimagic

optimagic is a Python package for numerical optimization. It is a unified interface to optimizers from SciPy, NlOpt and other packages. optimagic's minimize function works just like SciPy's, so you don't have to adjust your code. You simply get more optimizers for free. On top you get diagnostic tools, parallel numerical derivatives and more.
https://optimagic.readthedocs.io/
MIT License
270 stars 30 forks source link

Replace `DateFrame.applymap` with `DataFrame.map` (in estimation_table) #470

Closed ChristianZimpelmann closed 9 months ago

ChristianZimpelmann commented 1 year ago

pandas 2.1. deprecated DataFrame.applymap

New in version 2.1.0: DataFrame.applymap was deprecated and renamed to DataFrame.map.

The current estimation_table uses applymap in several occasions and produces many DeprecationWarnings.

Describe the solution you'd like

hmgaudecker commented 9 months ago

@timmens, could you have a look at whether you want to do a conditional import or stop supporting older pandas? I presume estimagic is used a lot in conjunction with pytask and it is very annoying to sift through pages of deprecation warnings before being able to see what actually happened with the build.