How to split a DataFrame in pandas in predefined percentages?
Creating a dataframe with 70% values of original dataframe
part_1 = df.sample(frac = 0.7)

Creating dataframe with rest of the 30% values
part_2 = df.drop(part_1.index)
I have a pandas dataframe sorted by a number of columns. Now I'd like to split the dataframe in predefined percentages, so as to extract and name a few segments. 
For example, I want to take the first 20% of rows to create the first segment, then the next 30% for the second segment and leave the remaining 50% to the third segment.
How would I achieve that?