I am trying to remove white spaces between quotes but not getting the right result. Could you please help me how to do this?
Example:
Local_Manufacturer|SKU_PackID_ProductNumber|Molecule_Name|BrandName_Intl
"UPJOHN "|"894265"|"SILDENAFIL"|"REVATIO"
Desirable output:
Local_Manufacturer|SKU_PackID_ProductNumber|Molecule_Name|BrandName_Intl
"UPJOHN"|"894265"|"SILDENAFIL"|"REVATIO"
I tried below code:
for c_name in df1.columns:
df1 = df1.withColumn(c_name, trim(df1[c_name]))