I have a data frame with strings of equal length (10). I want to "explode" this column into 10 columns. No matter what solution I try, there is a leading empty column. Existing solutions give me this problem, so needless to say existing answers to this question are not satisfactory.
import pandas as pd
df = pd.DataFrame(['tenletters', 'alsotenten', 'letter10!!', 'ten10lette'],
columns=['col1'])
df2 = pd.DataFrame(df['col1'].str.split('').tolist())
0 1 2 3 4 5 6 7 8 9 10 11
0 t e n l e t t e r s
1 a l s o t e n t e n
2 l e t t e r 1 0 ! !
3 t e n 1 0 l e t t e
How can I do this the proper way (i.e., without a leading empty column)?