ArrowTypeError: Did not pass numpy.dtype object', '转换失败的列 X 类型为 int32

Posted

技术标签:

【中文标题】ArrowTypeError: Did not pass numpy.dtype object\', \'转换失败的列 X 类型为 int32【英文标题】:ArrowTypeError: Did not pass numpy.dtype object', 'Conversion failed for column X with type int32ArrowTypeError: Did not pass numpy.dtype object', '转换失败的列 X 类型为 int32 【发布时间】:2021-08-02 18:36:52 【问题描述】:

问题

我正在尝试将数据框保存为 Databricks 上的镶木地板文件,但出现 ArrowTypeError。

Databricks 运行时版本: 7.6 ML(包括 Apache Spark 3.0.1、Scala 2.12)

日志跟踪

ArrowTypeError: ('Did not pass numpy.dtype object', 'Conversion failed for column inv_yr with type int32')

【问题讨论】:

在 DBR ML 版本上,最好使用已经安装在那里的库版本 【参考方案1】:

您面临的问题源于您使用的是旧的pyarrow ***和最新的numpy 1.20 版本。您遇到了错误"PyArray_DescrCheck doesn't work anymore if the consumer library was compiled with an older NumPy version "。更新您的pyarrow 版本或降级到numpy<1.20

【讨论】:

以上是关于ArrowTypeError: Did not pass numpy.dtype object', '转换失败的列 X 类型为 int32的主要内容,如果未能解决你的问题,请参考以下文章

成功解决numpy.linalg.LinAlgError: SVD did not converge

Server did not recognize the value of HTTP Header SOAPAction 错误怎么解决?

windows运行Hadoop报错:Did not find winutils.exeCould not locate Hadoop executable:

解决git did not exit cleanly (exit code 128)

解决git did not exit cleanly (exit code 128)

did not call through to super.onCreate()