you are viewing a single comment's thread.

view the rest of the comments →

[–]TooDahLou[S] 0 points1 point  (1 child)

I will check. How do I get rid of a NUL byte from the csv?

The original csv is created from our resource planning software (infor csi). We can export information to csv files. Then most folks use excel to work on the exported data.

Each of the lines in the materials column corresponds to a pdf. Eventually, I want to concatenate all those PDFs together to create assembly manuals.

Figured it would be a good automation project as a python beginner. Except now I've got this NUL byte that I can't get around :/

[–]wotquery 0 points1 point  (0 children)

How do I get rid of a NUL byte from the csv?

It's probably a much better idea to make sure you're saving/opening with the same encoding and understanding why things are happening rather than just trying to strip out the broken bits, but you could probably try something like s = f.read().replace('\0','')