"how to do a left,right and mid of a string in a pandas dataframe",df['state'].apply(lambda x: x[len(x) / 2 - 1:len(x) / 2 + 1])