I have a pandas dataframe which is indexed by strings. Let's say my index looks like df.index = ['AA','AB','AC',...] and I want to access df.loc['AC':'AE'], which works well.
Is there any way to get the position of these indices, giving me ['AC':'AE'] => [2,3,4]? I know there is df.index.get_loc('AC') => 2 but this works only for single values and not for lists.