s-leroux / fin

Set of tools for personal investment
MIT License
1 stars 0 forks source link

Add the `union` operator #41

Closed s-leroux closed 2 months ago

s-leroux commented 2 months ago

Add the union operator to combine two (more?) series that have the same columns.

This may be useful when loading data in chunks and you want to combine them to return the result as a single series.

s-leroux commented 2 months ago

Implemented in fa77844c19fb6a3b4d14d27692c1d6867d670ea6.

It is not obvious if this should be an instance method or a static method:

res = serA.union(serB)

vs

res = Serie.union(serA, serB)
s-leroux commented 2 months ago

Chaining:

res = serA.union(serB).union(serC) res = Serie.union(serA, serB, serC)

I will keep the first solution as it is now. Closing.