I have below pandas dataframe
import pandas as pd
data = pd.DataFrame({'x1':range(10, 18), # Create pandas DataFrame
'x2':['a', 'b', 'b', 'c', 'd', 'a', 'b', 'd'],
'x3':range(27, 19, - 1),
'x4':['x', 'z', 'y', 'y', 'x', 'y', 'z', 'x']})
Now I want to slice this dataframe at index points starting at Pt = [0, 3, 5], and then put all these sliced dataframe in a list of length 3.
Could you please help if there is any method or function to achieve that?