1

I work with CSV files and upload them to an S3 server. Sometimes after a small process that I did with the file I get hidden characters to look like this  before the first columns, I want to write a script that "clean" the files before upload but I can see those characters only on specific text editors like nano, the python didn't recognize those characters and I can see them in Amazon Athena after the query was created already and I need to upload it again. Does anyone know a solution to this problem?

MrShakila
  • 874
  • 1
  • 4
  • 19
DanSega1
  • 11
  • 2
  • The characters you've shown don't look like "hidden" to me. Why not check where they are coming from and block that, instead of removing them afterwards? – Nico Haase Oct 20 '22 at 08:27

1 Answers1

0

After a small research I learn that the symbol called BOM and they added to the files because I added encoding='utf-8'.

DanSega1
  • 11
  • 2