get the middle two characters of a string 'state' in a pandas dataframe `df`,df['state'].apply(lambda x: x[len(x) / 2 - 1:len(x) / 2 + 1])