【发布时间】:2019-07-25 15:09:05
【问题描述】:
我在 Conda 环境中使用 Python 并安装了 pyarrow:
conda install pyarrow
然后尝试以下代码:
import pyarrow as pa
import pandas as pd
df = pd.DataFrame({"a": [1, 2, 3]})
# Convert from Pandas to Arrow
table = pa.Table.from_pandas(df)
# Convert back to Pandas
df_new = table.to_pandas()
得到错误:
AttributeError: module 'pyarrow' has no attribute 'Table'
我尝试重新创建一个新的 Conda 环境(通过关注 https://anaconda.org/conda-forge/pyarrow)并运行:
conda create -n pypq python=3.6 anaconda
source activate pypq
conda install -c conda-forge pyarrow
遇到同样的错误:
AttributeError: module 'pyarrow' has no attribute 'Table'
可能是什么问题?
【问题讨论】:
-
请同时发布
conda命令输出的链接,以便我们了解发生了什么。