Skip to content Skip to sidebar Skip to footer

CSV Reader Different Outputs On Ubuntu And Windows - Python

I have a file called Some.csv which has a field (column) which has values like 1000, 2000, .... 39000. I wanted only the files with 39000 so I wrote the following python script

Solution 1:

You must use wb mode for csv files if you are using Python 2.x:

https://docs.python.org/2/library/csv.html#csv.writer

If csvfile is a file object, it must be opened with the ‘b’ flag on platforms where that makes a difference.


Solution 2:


Post a Comment for "CSV Reader Different Outputs On Ubuntu And Windows - Python"