Reputation: 111
I had a column in data frame and I wanted to convert each value in the column cpro to a two digit number by adding '0' in front of it if the number is less than 10. I had done it in the following way '0'.join(df.loc[df['cpro']<10,'cpro'].astype(str).tolist())
Upvotes: 1
Views: 1153