Python Time Series Split Python Method Chaining In Javascript