Spark Scala:根据另一列的值更改列的值
我在Spark Scala中是新的(也在Stackov,所以很高兴成为社区的一部分)。有一个我无法执行的查询:
我有此DF,希望每次列“编号”的值为“ 446118”,列“类型”类型“更改为“ P”,以及类型中的所有其他值,请保持相同方式。这不使用column功能。我知道可以使用功能,但我不知道如何在更改另一列的价值的情况下使用另一个列的值。
如果有人帮助我,我会很感激。
I'm kind of new in Spark Scala (also in StackOv so it's a pleasure to be part of the community). There's a query that I can not perform:
I have this DF where I wish everytime column "number" has the value of "446118", the column "type" change to "P" and all the other values in type, stay the same way. This without using withColumn function. I know could be with function where but I don't know how to use where when it's about changing the value of one column depending of another one.
I would be grateful if someone help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论