Skip to content

Commit

Permalink
Add empty col to data frame (#225)
Browse files Browse the repository at this point in the history
Needed to use pandas 1.5.0
  • Loading branch information
dafeda authored Oct 10, 2022
1 parent 433a948 commit b767a96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
REQUIREMENTS = [
"ecl>=2.9",
"numpy",
"pandas<1.5.0",
"pandas",
"pyyaml>=5.1",
]

Expand Down
4 changes: 3 additions & 1 deletion src/fmu/ensemble/realization.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,14 @@ def load_status(self):
errorjobs = status[errorcolumns[0]] != ""

# Merge any error strings:
status.loc[errorjobs, "errorstring"] = (
error_string = (
status.loc[errorjobs, errorcolumns]
.astype(str)
.apply(" ".join, axis=1)
.apply(str.strip)
)
status["errorstring"] = np.nan
status.loc[errorjobs, "errorstring"] = error_string
status.drop(errorcolumns, axis=1, inplace=True)

# Delete potential unwanted row
Expand Down

0 comments on commit b767a96

Please sign in to comment.