Mark Heptonstall
Mark Heptonstall

Reputation: 105

TQDM progress_apply error on import in Jupyter notebook

I am using TQDM's progress_apply function in Jupyter notebook, but get a future warning (as below) when importing the module using:

from tqdm.notebook 
import tqdm tqdm.pandas()

future Warning ....\lib\site-packages\tqdm\std.py:697: FutureWarning: The Panel class is removed from pandas. Accessing it from the top-level namespace will also be removed in the next version

How would I correct my code to future proof this?

Upvotes: 1

Views: 663

Answers (1)

jdsurya
jdsurya

Reputation: 1376

tqdm has a especial wrapper for pandas and the maintainers of tqdm need to watch any API changes done to new releases of pandas, and make adjustments for any breaking changes.

This particular warning means that - pandas removed a class called Panel and you should not be using this class from the tqdm wrapper.

If you want to avoid seeing this warning, you can suppress it by following the discussion in this thread Hide all warnings in ipython

Also, this warning message is version specific and it would help people if you update the version of tqdm and pandas you are getting this warning with.

Upvotes: 2

Related Questions