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

CSV fields containing commas must be quoted #1197

Open
Thewodoros opened this issue Dec 23, 2022 · 0 comments
Open

CSV fields containing commas must be quoted #1197

Thewodoros opened this issue Dec 23, 2022 · 0 comments

Comments

@Thewodoros
Copy link

Description

In Model Exchange mode, my FMU writes derivatives into results, and their column headers contain commas. This confuses the programs reading these CSV. Such fields must be surrounded with double quotes.

Steps to reproduce the behavior

I used driveline model from Amesim FMU tutorial. When in Model exchange mode, it writes a lot of derivatives into the result file, so the header row looks like this:

time,model.root.system.signal03.output,model.root.system.rotaryspeedsensor.wsig,model.root.system.rotaryload2ports_1.w,model.root.system.rotaryspringdamper.are,model.root.system.mass_friction1port.v1,model.root.system.mass_friction1port.x1,model.root.system.rotaryload2ports.w,model.root.system.der(rotaryload2ports_1.w,1),model.root.system.der(rotaryspringdamper.are,1),model.root.system.der(mass_friction1port.v1,1),model.root.system.der(mass_friction1port.x1,1),model.root.system.der(rotaryload2ports.w,1)

Expected behavior

Fields with commas should be quoted, like this

time,model.root.system.signal03.output,model.root.system.rotaryspeedsensor.wsig,model.root.system.rotaryload2ports_1.w,model.root.system.rotaryspringdamper.are,model.root.system.mass_friction1port.v1,model.root.system.mass_friction1port.x1,model.root.system.rotaryload2ports.w,"model.root.system.der(rotaryload2ports_1.w,1)","model.root.system.der(rotaryspringdamper.are,1)","model.root.system.der(mass_friction1port.v1,1)","model.root.system.der(mass_friction1port.x1,1)","model.root.system.der(rotaryload2ports.w,1)"

Version and OS

  • Version: 2.1.1.post190, installed through pip
  • OS: Win10 22H2, 64bit
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

1 participant