TimeSeries.
trim
Remove NaNs from a TimeSeries start, end or both
side – the side where to remove the NaNs. Valid values are either “start”, “end” or “both”. Default to “both”
TimeSeries