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

Sample.ImportFromCSVFile cannot manage unicode descriptions #2634

Open
mbaudin47 opened this issue Apr 29, 2024 · 0 comments
Open

Sample.ImportFromCSVFile cannot manage unicode descriptions #2634

mbaudin47 opened this issue Apr 29, 2024 · 0 comments

Comments

@mbaudin47
Copy link
Collaborator

mbaudin47 commented Apr 29, 2024

What happened?

I want to load this file: simulations.csv.txt.

The header is:

"Pmax (bar)";"Tmax (°C)"

Reading the data file with ImportFromCSVFile fails, because of the unicode character "°".
The workaround is to use:

"Pmax (bar)";"Tmax (deg C)"

How to reproduce the issue?

import openturns as ot
print(ot.__version__)

sample = ot.Sample.ImportFromCSVFile("simulations.csv.txt")

On output, the data is:

data_0 data_1
141.3877 61.15868
338.3609 102.0516

We see that the descriptions are lost.

Version

1.22

Operating System

Windows

Installation media

conda

Additional Context

This is similar to #1288.

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

No branches or pull requests

1 participant