79102088

Date: 2024-10-18 12:32:51
Score: 1.5
Natty:
Report link

You can set the encoding of the file you are reading from, so

df = sqlContext
    .read
    .option("encoding", "yourEncoding")//replace yourEncoding with whatever your input file encoding is, I asume latin-1?
    .csv("file.csv", header=False, schema = schema)

more on available options here: https://spark.apache.org/docs/latest/sql-data-sources-csv.html#data-source-option

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: jeekiii