Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to csv doubles each line with an empty row #135

Closed
livias opened this issue Feb 22, 2018 · 4 comments
Closed

Export to csv doubles each line with an empty row #135

livias opened this issue Feb 22, 2018 · 4 comments

Comments

@livias
Copy link

livias commented Feb 22, 2018

Pyhton version

Please write here the output of printing sys.version

Platform information

Please write here the output of printing platform.platform()

Numpy version

Please write here the output of printing numpy.__version__

mdfreader version

Please write here the output of printing mdfreader.__version__

Description

Please describe the issue here and eventually script used to use mdfreader

Also mentionning version of mdf file will be helpfull (using mdfvalidator or mdfreader if functionnal for reading)

print of issue related variables at the errors location and eventually mdfvalidator screenshots can help troubleshooting complicated issues

@cristi-neagu
Copy link
Contributor

First of, the template is there for a reason. Please use it as much as possible.

Secondly, to fix this, this line from mdfreader.py needs to change to this:

f = open(filename, "wt", encoding=encoding, newline='')

@livias
Copy link
Author

livias commented Mar 1, 2018

Thank you.

@livias livias closed this as completed Mar 1, 2018
@ecalpy
Copy link

ecalpy commented Mar 21, 2021

Hello - I'm having the same issue (my .csv export files have empty rows between data- and I'd like to remove that). I tried adding the "newline='' " into the open function, but it does not change anything. What else could I be doing wrong?

Also just wondering what the background of why there's empty rows on the exports? Readability?

Many thanks!!
-ecalpy

PS+ Second question if possible to also answer here: Is there a possibility to have the time array start from 0?

@ecalpy
Copy link

ecalpy commented Mar 23, 2021

First of, the template is there for a reason. Please use it as much as possible.

Secondly, to fix this, this line from mdfreader.py needs to change to this:

f = open(filename, "wt", encoding=encoding, newline='')

Hello- following up that this suggestion did not help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants