after sucessfully downloading the module
!pip install pyjanitor # works successfully
import janitor as jn # which worked just fine in the past, but suddenly throwing the following TypeError
TypeError: 'type' object is not subscriptable I am using google colab. I also tried just import janitor instead of import janitor as jn, that also didn't work any help to fix this is greatly appreciated.
I think that's the package's error.
Another person also reported the error that he couldn't import the package.
According to the GitHub issue page, They plan to fix it. the current version is 0.24.0
There are several ways to fix it.
Until the fix is released, use the previous package.
To remove the current pyjanitor in jupyter
To install the previous version of the package in jupyter.
OR if you are familiar with the library, you may fix the bug with this comment
It shows a message like this.
In my case, I have to go to Location:
/usr/local/lib/python3.8/site-packagesand find a directory calledjanitorPut a string
from __future__ import annotationsin these files.OR you can try
pyjanitoron python 3.9+.