CADWRDeltaModeling / vtools3

Pandas/xarray implementation of the most important functionality of vtools, emphasizing csv and netcdf as data sources.
https://cadwrdeltamodeling.github.io/vtools3/
Apache License 2.0
7 stars 1 forks source link

merge_ts #7

Open water-e opened 4 years ago

water-e commented 4 years ago

vtools has traditionally provided a function: ts_merged = merge_ts( [ ts0, ts1, ts2])

This function prioritizes the series, concatenates them in time, prioritizes overlap and returns the complete produce. Pandas has good tools for the concatenation part, but if there is overlap it returns an improper frame with redundant entries and recovering from this properly 1) requres a fair amount of code and 2) represents something people tend to not expect.

The implementation in vtools3 will carry forth the expected legacy behavior from vtools, but will do so over a possibly multivariate series, initially pandas with columns.

water-e commented 2 years ago

This is in progress. One issue is that prior tools were easy to line up just based on index. Pandas behavior requires column names to be the same. An option to align columns might be nice.