I need to split a dataframe in spark using scala based on a give ratio. This should be done on the sorted version of dataframe by a particular column named ts. The first ratio is used for a training and the lats part is going to be used for validation.I need to split a dataframe in spark using scal