Python Time Series Split Python Method Chaining Javascript