1

如何修复此错误:###尝试 4 from sqlalchemy import create_engine user = '*****' pasw = '*****' host = 'TD'

# connect
td_engine = create_engine('teradata://' + user + ':' + pasw + '@' + host + ':22/')

从 sqlalchemy 导入 create_engine

engine = create_engine('sqlite:///:memory:', echo=True) user = '****' pasw = '****' host = 'TD'

connect td_engine = create_engine('teradata://' + user + ':' + pasw + '@' + host + ':22/') Traceback(最近一次调用最后):

文件“”,第 8 行,在 td_engine = create_engine('teradata://' + user + ':' + pasw + '@' + host + ':22/')

文件“C:\Users****\AppData\Local\Continuum\Anaconda3\lib\site-packages\sqlalchemy\engine__init__.py”,第 387 行,在 create_engine 返回 strategy.create(*args, **kwargs)

文件“C:\Users****\AppData\Local\Continuum\Anaconda3\lib\site-packages\sqlalchemy\engine\strategies.py”,第 56 行,创建入口点 = u._get_entrypoint()

_get_entrypoint cls = registry.load(name) 中的文件“C:\Users****\AppData\Local\Continuum\Anaconda3\lib\site-packages\sqlalchemy\engine\url.py”,第 139 行

文件“C:\Users****\AppData\Local\Continuum\Anaconda3\lib\site-packages\sqlalchemy\util\langhelpers.py”,第 218 行,加载中(self.group,名称))

NoSuchModuleError:无法加载插件:sqlalchemy.dialects:teradata

4

1 回答 1

1

在您的系列数据中添加频率。y = y.asfreq(freq='7d')

参考:https ://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.asfreq.html#pandas.Series.asfreq

于 2017-08-16T21:34:22.980 回答