In my case, even though I used the above options for uninstalling and installing using pip, the code still gave me the same errors.
Finally, I created a virtual environment and installed numpy and pandas using pip in my virtual environment. Now the code is working.
Steps: for Anaconda3 - Please change according to your installation type: [if you do not have the env virtual package installed]
$ pip install virtualenv
[from the command line, go to the directory using c: \ anadonda3 \ scripts
[write the following command to use virtual env to create a virtual env for you in your chosen location]
$virtualenv c:\anaconda3\envs\my_virtual_env
[after creation you will need to activate your virtual environment]
$c:\anaconda3\envs\my_virtual_env\scripts activate
[pip now installs numpy and pandas and other necessary packages using pip]
[After installation is complete, exit the virtual environment]
$c:\anaconda3\envs\my_virtual_env\scripts deactivate
now use python.exe inside your env virtual folder to run the script, and it will work even with python 3.7.
source share