I've had this pandas issue, and it was resolved by deleting all folders relating to pandas within the python Lib/site-packages folder, then reinstalling
for reinstalling I had to use pip install <pandas.whl file> --user --force-reinstall --no-dependencies
and I also needed Numpy version less than 2.0 (so 1.26.4 in my case)