title: How to split a DataFrame in pandas in predefined percentages?
body: <p>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. </p>
  
  <p>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.</p>
  
  <p>How would I achieve that?</p>