Skip to content

Commit f0354d2

Browse files
committed
Preserve column ordering in priors_to_measurements
Appending instead of preprending the new observables/measurements will preserve the column order.
1 parent ec5d036 commit f0354d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

petab/v1/priors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ def scaled_observable_formula(parameter_id, parameter_scale):
191191

192192
new_problem.observable_df = pd.concat(
193193
[
194-
pd.DataFrame(new_observable_dicts).set_index(OBSERVABLE_ID),
195194
new_problem.observable_df,
195+
pd.DataFrame(new_observable_dicts).set_index(OBSERVABLE_ID),
196196
]
197197
)
198198
new_problem.measurement_df = pd.concat(
199199
[
200-
pd.DataFrame(new_measurement_dicts),
201200
new_problem.measurement_df,
201+
pd.DataFrame(new_measurement_dicts),
202202
],
203203
ignore_index=True,
204204
)

0 commit comments

Comments
 (0)