vendredi 21 août 2020

Is there an alternative for the soon-to-be-deprecated pandas.util.testing.assert_produces_warning?

I don't see one in the API, though the warning suggests it should be available:

In [1]: import pandas

In [2]: from pandas.util.testing import assert_produces_warning
/home/mghenis/anaconda3/bin/ipython:1: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
  #!/home/mghenis/anaconda3/bin/python


In [3]: from pandas.testing import assert_produces_warning
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-38c6b9f78373> in <module>
----> 1 from pandas.testing import assert_produces_warning

ImportError: cannot import name 'assert_produces_warning' from 'pandas.testing' (/home/mghenis/anaconda3/lib/python3.7/site-packages/pandas/testing.py)

Aucun commentaire:

Enregistrer un commentaire