Python Time Series Split Python Method Chaining Ruby