Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to add zeros in front of numbers in pandas

number = 15 # number of zeroes to add
df['ID'] = df['ID'].str.zfill(number)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #zeros #front #numbers #pandas
ADD COMMENT
Topic
Name
4+2 =