Quantcast
Channel: How to make conditional formatting work in pandas? - Stack Overflow
Browsing all 2 articles
Browse latest View live

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 Article



How 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
Browsing all 2 articles
Browse latest View live




Latest Images