首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Python与Exasol的连接-导出到pandas

Python与Exasol的连接-导出到pandas
EN

Stack Overflow用户
提问于 2018-05-23 21:19:45
回答 1查看 1.3K关注 0票数 0

我对Exasol v.6.0.4中的熊猫出口数据有问题。我可以与Exasol连接,但当我想要将数据传输到pandas DataFrame时,我就会出错。我使用的是库pyexasol。我的代码如下:

代码语言:javascript
复制
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

错误:

代码语言:javascript
复制
TypeError: cannot serialize '_io.FileIO' object

我做了什么坏事?如何将数据从Exasol query导出到Pandas DataFrame?我的库和工具版本:

代码语言:javascript
复制
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)

请帮帮忙!:)

EN

回答 1

Stack Overflow用户

发布于 2018-06-14 14:04:53

PyEXASOL创建者来了!您的代码是正确的。

这个问题与Windows“多处理”模块实现缺少fork()和试图序列化在http_transport.py中创建的管道句柄有关。

此问题已从版本0.3.23开始修复。请更新程序包。

代码语言:javascript
复制
pip install --upgrade pyexasol
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50489512

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档