Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
estimate123 opened this issue Dec 4, 2020 · 2 comments
Open

Comments

@estimate123
Copy link

我使用的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
Copy link

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

@Hdjdnsj
Copy link

Hdjdnsj commented Jan 12, 2023

解决了吗?我也是

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants