how to extract frist 10 characters from a column in python code example
Example: pandas column string first n characters
df1['StateInitial'] = df1['State'].str[:2]
print(df1)
df1['StateInitial'] = df1['State'].str[:2]
print(df1)