在使用MXNET中Gluonts进行深度学习的时候,经常会用到pandas库对训练数据进行读取以及处理,但是pandas库的1.1.0版本及之后都不再支持时间戳的可哈希化了,笔者试了panda库的1.0.0版本2020.1时可以支持时间戳可哈希化的。详见此文,以及此文
In Pandas 1.1 the freq component of the time-stamps that we use have stopped being hashable, which means, they cannot be used as keys in dictionaries. We use this in different locations in our code base.
We now have two options:
open an issue with pandas, requesting that the old behaviour is restored
change our code to not make use of this feauture
使用pandas1.1.0及之后版本对时间戳数据进行处理,进行深度神经网络训练时就会报错错误代码"unhashable type: 'pandas._libs.tslibs.offsets.Hour",使用 pip install -U pandas==1.0.0 重新安装低版本的pandas即可解决此问题。