我正在尝试修剪任何给定DataFrame中的左右空格,但仅限于字符串列(以便不改变DataFrame的模式)。另一种解决方案是修剪所有列,然后推断模式或在修剪后替换模式。但我也不知道该怎么做。这就是我现在正在做的。from pyspark.sql.functions import col
columnList = [item[0] for item in mmDF.dtypescol, func
从Oracle加载数据并写入PostgreSQL时遇到奇怪的问题。无法将带空格的字符串写入postgres。sequence for encoding "UTF8": 0x00 Call getNextException to see other errors in the batchdata= data.withColu
我看到另一个帖子建议使用这个语句来修剪数组中包含的字符串变量:但是,如果首先字符串没有包含在数组中,我希望有一个trim函数,它可以像这样使用bbb ';trimAll($a,$b,$c); //arbitrary number of string variables can be passed
我试着写