I am working on a test where I provide a CSV file with some rows, run the code using that CSV, generate another CSV, and then compare the results. In one of the input files, I was using the £ sign, while in the comparison file I was using �. It was working fine before, but after adding more rows, it started failing, and now it’s reporting ´┐¢.
The issue may be related to the default encoding used by the code editor, but I’m not sure what the exact problem is.
write_to_s3 = (result_dataframe, s3):
data_buffer = BytesIO()
data_result.toPandas().to_csv(
data_buffer,
encoding='cp850',
)
´┐¢is UTF-8-encoded REPLACEMENT CHARACTER(�) incorrectly decoded as CP850 (The Western Europe encoding used by cmd.exe in Windows). If you are using CP850, why did you tag the question withcp866?