Answer by anky for How to make conditional formatting work in pandas?
you can do this with a mask created by series.str.startswith and series.mask or np.where:s = df['Invoice number']s.mask(s.str.startswith('.'),s.str.replace(".",""))Or if one is comfortable using a...
View ArticleHow to make conditional formatting work in pandas?
I have the following df:Invoice number.5.302I want to replace the '.' because it gets captured incorrectly. This is succesful with the following code:df['Invoice number'] = df['Invoice...
View Article
More Pages to Explore .....