add leading zeros to strings in pandas dataframe,df['ID'] = df['ID'].apply(lambda x: '{0:0>15}'.format(x))