Q:

slice a df based on the values that appear in a list

I have a list with values:
['A','B','C']

then I have a df those index contains that list values: 
      valuess
A       3
Ai      4
Aii     5 
Aiii    4
B       2
Bi      3
Bii
Biii

I would like to get a df composed by the next 3 values below the values that appear in the array , for the first case would be :
     valuess
A       3
Ai      4
Aii     5 
Aiii    4

and group the dfs into a list.

A:

Use:
L = ['A','B','C']
df = df.groupby(np.cumsum(df.index.isin(L))).head(4)
print (df)
      valuess
A         3.0
Ai        4.0
Aii       5.0
Aiii      4.0
B         2.0
Bi        3.0
Bii       NaN
Biii      NaN

If possible first value of index not match value from list:
L = ['A','B','C']
arr = np.cumsum(df.index.isin(L))
df = df[arr != 0].groupby(arr[arr != 0]).head(4)

