问遍历Panda的df列以删除strEN版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅...
df.withColumn('address', translate('address','123','ABC')) \ .show(truncate=False)#Replace column with another columnfrompyspark.sql.functionsimportexpr df = spark.createDataFrame([("ABCDE_XYZ","XYZ","FGH")], ("col1","col2","col3")) df.withColumn("new_column", expr("regexp_repla...