Try:
df['ID'] = df['ID'].apply(lambda x: '{0:0>15}'.format(x))
or even
df['ID'] = df['ID'].apply(lambda x: x.zfill(15))
More Related Contents:
- Filter pandas DataFrame by substring criteria
- Pandas filtering for multiple substrings in series
- Fast punctuation removal with pandas
- Create Pandas DataFrame from a string
- Remove unwanted parts from strings in a column
- String concatenation of two pandas columns
- pandas dataframe str.contains() AND operation
- Pandas DataFrame stored list as string: How to convert back to list
- Pandas Extract Number from String
- Pandas column access w/column names containing spaces
- Convert columns to string in Pandas
- Get last “column” after .str.split() operation on column in pandas DataFrame
- How to remove square bracket from pandas dataframe
- Remove non-ASCII characters from pandas column
- NLTK-based text processing with pandas
- Left justify string values in a pandas DataFrame
- Count number of words per row
- Converting a column within pandas dataframe from int to string
- removing newlines from messy strings in pandas dataframe cells?
- Print very long string completely in pandas dataframe
- Filter string data based on its string length
- Convert a columns of string to list in pandas
- FutureWarning: The default value of regex will change from True to False in a future version
- How to remove numbers from string terms in a pandas dataframe
- Column of lists, convert list to string as a new column
- How to use str.contains() with multiple expressions in pandas dataframes
- Filtering pandas dataframe rows by contains str
- Copy text between parentheses in pandas DataFrame column into another column
- pandas combine two strings ignore nan values
- pandas – convert string into list of strings [duplicate]