stop spark createdataframe(pandas.df) from stripping / trimming strings
.option("ignoreTrailingWhiteSpace",False).option("ignoreLeadingWhiteSpace",False)
when saving is the the solution. Why its default True is a mystery
When i convert a pandas data frame to spark, spark automatically strips the String columns/ deletes leading and trailing spaces. How can this be stopped?
sparkframe = spark.createDataFrame(pandas_df)
Example '  ' -> '' or 'ab ' -> 'ab'