Commit cb67a64a authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

util: adjust to make it work with pandas 0.23

While we're at it, we sort the index the right way.
parent 20a701d018cb
......@@ -11,7 +11,7 @@ setup(name='tshistory',
'pandas', # up to 0.23
......@@ -70,10 +70,10 @@ class SeriesServices(object):
def patch(self, base, diff):
assert base is not None
assert diff is not None
patched = pd.Series([0.0], index=base.index.union(diff.index))
newindex = base.index.union(diff.index).sort_values()
patched = pd.Series([0] * len(newindex), index=newindex)
patched[base.index] = base
patched[diff.index] = diff
patched.sort_index(inplace=True) =
return patched
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment