Fixing ValueError in _split_data