Found the answer myself, I was using the latest Pandas v1.2.0, where the panel has been removed from Pandas module 0.25.0 onwards.
print(pd.__version__)
print(np.__version__)
1.2.0
1.19.4
From 0.25.0 / 1.2.0 release notes
Warning: The panel has been fully removed. For N-D labeled data structures, please use xarray
unless you want to use xarray, you need to uninstall and install the version prior to that.
Answer from Jijo John on Stack OverflowAttributeError: module 'pandas' has no attribute 'Float64Dtype'
pandas support when calling xarray.open_rasterio
AttributeError: module 'pandas' has no attribute 'core'
AttributeError: module 'pandas' has no attribute 'compat'
Videos
"Have you tried turning it off and on again?" (Roy of The IT crowd)
This happened to me today, which is why I ended up to this page. Seeing that error was weird since, recently, I have not made any changes in my Python environment. Interestingly, I observed that if I open a new notebook and import pandas I would not get the same error message. So, I did shutdown the troublesome notebook and started it again and voila it is working again!
Even though this solved the problem (at least for me), I cannot readily come up with an explanation as to why it happened in the first place!
There's this bug in the latest version of pandas (pandas 0.23) that gives you an error on importing pandas.
But this can be easily fixed by installing an earlier version of pandas (pandas 0.22) using the command pip install pandas==0.22 on Windows Command Prompt.