У меня есть следующий плохо отформатированный текстовый файл:
id;text;contact_id
1;Reason contact\
\
The client was not satisfied about the quality of the product\
\
;c_102932131
Я пытаюсь загрузить файл, используя pyspark, используя:
df = sc.read\
.option("delimiter", ";")\
.option("header", "true")\
.option("inferSchema", "true")\
.option("multiLine", "true")\
.option("wholeFile", "true")\
.csv(os.path.join(appconfig.configs[appconfig.ENV]["ROOT_DIR"], "data", "input", file_name))
Но текст столбца усекается, так как датафрейм:
id|text|contact_id
1|Reason contact|null
null|null|c_102932131
Так я теряю все остальные строки. Цель состоит в том, чтобы правильно прочитать файл следующим образом:
id|text|contact_id
1|Reason contact The client was satisfied not about the quality of the product|c_102932131
Как я могу это сделать? Спасибо