我有一个spark数据帧,我用这种方式创建它:
tx_df = (spark
.read
.parquet("/data/file"))
tx_ecommerce = tx_df.filter(tx_df["POS_Cardholder_Presence"]=="ECommerce").show()
我试着把tx\ U商业转换成熊猫数据帧。我试着这样:
tx_ecommerce.toPandas()
但我有个错误:
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in ----> 1 tx_ecommerce.toPandas()
AttributeError: 'NoneType' object has no attribute 'toPandas'
请帮忙解决这个问题好吗?你知道吗
谢谢
当您将.show()放在末尾时,它不再是pyspark数据帧。你知道吗
移除它,它应该可以工作。你知道吗
相关问题 更多 >
编程相关推荐