intent: how to do a left,right and mid of a string in a pandas dataframe
rewritten_intent: get the middle two characters of a string 'state' in a pandas dataframe `df`
snippet: df['state'].apply(lambda x: x[len(x) / 2 - 1:len(x) / 2 + 1])