Spark数据框na.fill布尔列类型 [英] Spark dataframe na.fill boolean column type

查看:53
本文介绍了Spark数据框na.fill布尔列类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够填写Numberic&字符串类型的列使用:

I am able to fill Numberic & String type columns using:

masterDF = masterDF.na.fill(-1)
masterDF = masterDF.na.fill("")
masterDF = masterDF.na.fill(-1.0)

但是我没有找到api来填充布尔类型列.我尝试了此操作: masterDF = masterDF.na.fill(false)不支持.

But I did not find api to fill boolean type column. I tried this: masterDF = masterDF.na.fill(false) which is not supported.

有什么想法吗?

推荐答案

na.fill 在版本 2.3.0 中添加了布尔类型,并且以前的版本不支持填充布尔类型列.请在此处.

na.fill Boolean type is added at version 2.3.0 and previous versions don't support filling Boolean type column. See the API specs here.

这篇关于Spark数据框na.fill布尔列类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆