我从 Exasol v.6.0.4 将数据导出到 pandas 时遇到问题。我可以连接 Exasol,但是当我想将数据传输到 pandas DataFrame 时出现错误。我正在使用库 pyexasol。我的代码如下:
from pyexasol import ExaConnection
con = ExaConnection(dsn=dns, user=user, password=password)
con.execute('OPEN SCHEMA SCHEMATEST1') #to this moment everything works correct
data = con.export_to_pandas('select * from TABLETEST1') # pandas data frame per default
错误:
TypeError: cannot serialize '_io.FileIO' object
我做错了什么?如何将 Exasol 查询中的数据导出到 Pandas DataFrame?我的库和工具版本:
Exasol 6.0.4
Python 3.6.4
Libraries:
backcall (0.1.0)
bleach (2.1.3)
colorama (0.3.9)
decorator (4.3.0)
entrypoints (0.2.3)
html5lib (1.0.1)
ipykernel (4.8.2)
ipython (6.4.0)
ipython-genutils (0.2.0)
ipywidgets (7.2.1)
jedi (0.12.0)
Jinja2 (2.10)
jsonschema (2.6.0)
jupyter (1.0.0)
jupyter-client (5.2.3)
jupyter-console (5.2.0)
jupyter-core (4.4.0)
MarkupSafe (1.0)
mistune (0.8.3)
nbconvert (5.3.1)
nbformat (4.4.0)
notebook (5.5.0)
numpy (1.14.3)
pandas (0.23.0)
pandocfilters (1.4.2)
parso (0.2.1)
pickleshare (0.7.4)
pip (9.0.1)
prompt-toolkit (1.0.15)
pyasn1 (0.4.2)
pyexasol (0.3.17)
Pygments (2.2.0)
pyodbc (4.0.23)
python-dateutil (2.7.3)
pytz (2018.4)
pywinpty (0.5.1)
pyzmq (17.0.0)
qtconsole (4.3.1)
rsa (3.4.2)
scikit-learn (0.19.1)
scipy (1.1.0)
Send2Trash (1.5.0)
setuptools (28.8.0)
simplegeneric (0.8.1)
six (1.11.0)
sklearn (0.0)
terminado (0.8.1)
testpath (0.3.1)
tornado (5.0.2)
traitlets (4.3.2)
wcwidth (0.1.7)
webencodings (0.5.1)
websocket-client (0.47.0)
widgetsnbextension (3.2.1)
请帮忙!:)