Closed Daniel-Trung-Nguyen closed 10 months ago
I always keep a unique identifier for all table based pars and obs and use that as my pst_from index_col. Then I can easily split that off and join to other tables.
In your case, is pst _from assigning the name "ob10" to the 1987 sample?
Yes, here is the longname version of that. You can see the first obs is at the 10th location and the time series data is jumping around. I am using pyemu shipped with the GMDSI_notebooks
What does your pf.add_parameters() call look like?
Im sure there are places where we are using sets/dicts for lookup speed which is why the order is not aligned with the interface files.
Hi @Daniel-Trung-Nguyen, Suspect that you are passed this issue now.
We are definitely making use for sets and dicts for lookup speed. This can disrupt ordering. This can be a bit of a gotcha but we generally align things (pars and obs) on the values of indicies. As a general rule, safer to slice and dice those dataframes using loc
rather than iloc
(and assuming some preservation of order).
Will close this issue for now, reopen if still causing problems.
Hi, I found the PstFrom organize parameters and observations in an arbitrary order making it harder to update them using pandas. Is there a way to align them with the order in the observation and parameter files so I can do column swapping easily? Many thanks, Daniel