I wish to divide pandas dataframe to 3 separate sets. I know by using train_test_split from sklearn.cross_validation, one can divide the data in two sets (train and test). but, to perform these I couldn't find any solution about splitting the data into three sets. most preferably, I would like to have the indices of the original data.

I know here we would be using train_test_split two times and somehow we can adjust the indices. But is these a standard or built-in way to split the data into 3 sets instead of 2?

kindly help

I know here we would be using train_test_split two times and somehow we can adjust the indices. But is these a standard or built-in way to split the data into 3 sets instead of 2?

kindly help