ISA-tools / isa-api

ISA tools API
https://isa-tools.org
Other
40 stars 38 forks source link

Changed file opens to binary mode for to_csv calls. #521

Closed ptth222 closed 6 months ago

ptth222 commented 8 months ago

When writing dataframes using the to_csv method on Windows, blank rows are inserted after every row. There is a decent Stack Overflow post about the issue here: https://stackoverflow.com/questions/56398306/using-pandas-to-write-file-creates-blank-lines. The 2 best fixes are either to open the file in binary mode or don't open the file manually and just pass the filename to the method directly. I went through the package and found instances of "to_csv" usage and changed the opening style to "wb".

I initially only encountered this problem when writing study and assay files, so I know changing to "wb" fixes the issue there, but I did not test the other instances I found.

terazus commented 7 months ago

We need a very small discussion on this matter since the functions changed were not open_csv but simple open() functions.

ptth222 commented 7 months ago

@terazus Does "we" include me, or do you mean you guys?

terazus commented 7 months ago

@ptth222 It means whoever wants to participate :) you are warmly welcome to discuss this with us.

ptth222 commented 7 months ago

@terazus It can include me or not. I took "small discussion" to me like a voice communication meeting, so we would need to coordinate that if I needed to be in there.

terazus commented 6 months ago

Closing, dupe of #547