zhengchuanpan / GMAN

GMAN: A Graph Multi-Attention Network for Traffic Prediction (GMAN, https://fanxlxmu.github.io/publication/aaai2020/) was accepted by AAAI-2020.
Apache License 2.0
418 stars 106 forks source link

请问下loadData()里面 Time = df.index报错是为什么啊? #25

Open estimate123 opened 3 years ago

estimate123 commented 3 years ago

我使用的DCRNN下载下来的METR.h5文件,使用pandas对其进行读取,生成Time Embedding时,代码中TIME = df.index报错,如下: ssh://root@192.168.1.104:22/home/tank/anaconda3/envs/lpb/bin/python3.6 -u /home/tank/lxl/GMAN/GMAN-master/METR/analyzeData.py Traceback (most recent call last): File "/home/tank/lxl/GMAN/GMAN-master/METR/analyzeData.py", line 37, in print(df.index) File "/home/tank/anaconda3/envs/lpb/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 852, in repr attrs = self._format_attrs() File "/home/tank/anaconda3/envs/lpb/lib/python3.6/site-packages/pandas/core/indexes/datetimelike.py", line 381, in _format_attrs freq = self.freqstr File "/home/tank/anaconda3/envs/lpb/lib/python3.6/site-packages/pandas/core/indexes/extension.py", line 54, in fget result = getattr(self.data, name) File "/home/tank/anaconda3/envs/lpb/lib/python3.6/site-packages/pandas/core/arrays/datetimelike.py", line 1104, in freqstr return self.freq.freqstr AttributeError: 'numpy.bytes' object has no attribute 'freqstr'

Process finished with exit code 1

请问是我的数据集不对吗?还是我的Pandas版本(1.1.4)不对啊,为什么无法获取到这个index呢?万分感谢

Coolgiserz commented 3 years ago

我也遇到了类似的错误: AttributeError: 'numpy.bytes' object has no attribute 'delta'

Hdjdnsj commented 1 year ago

解决了吗?我也是