ImportError: cannot import name 'DtypeArg' from 'pandas

Solution 1:

It worked with me when I downgraded the pandas from panadas=1.3.5 to pandas=1.3.0 and I am using conda enviroment

Solution 2:

According to the answer provided in this post it is a bug in pandas==1.3.1.

A possible solution is to downgrade it to some earlier version, e.g pip install pandas==1.3.0