Skip to content

Commit

Permalink
change doc msg
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Jan 8, 2025
1 parent af8fab2 commit 6e0d3c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion antarest/study/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ def _create_edit_study_command(
# Can happen with data with only one column. In this case, we don't care about the delimiter.
delimiter = "\t"
df = pd.read_csv(io.BytesIO(data), delimiter=delimiter, header=None).replace(",", ".", regex=True)
df = df.dropna(axis=1, how="all") # We don't want to be able to import NaN columns
df = df.dropna(axis=1, how="all") # We want to remove columns full of NaN at the import
matrix = df.to_numpy(dtype=np.float64)
matrix = matrix.reshape((1, 0)) if matrix.size == 0 else matrix
return ReplaceMatrix(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def test_get_study_data(self, client: TestClient, user_access_token: str, intern
expected = 8760 * [[0]] if study_type == "raw" else [[]]
else:
df = pd.read_csv(io.BytesIO(content), delimiter=delimiter, header=None).replace(",", ".", regex=True)
df = df.dropna(axis=1, how="all") # We don't want to be able to import NaN columns
df = df.dropna(axis=1, how="all") # We want to remove columns full of NaN at the import
expected = df.to_numpy(dtype=np.float64).tolist()
assert written_data == expected

Expand Down

0 comments on commit 6e0d3c1

Please sign in to comment.