<human>:  Most efficient way to get the integer index of a key in pandas
<bot>: Here is some code to get the integer location of a key `bob` in a pandas data frame

df.index.get_loc('bob')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.