Skip to content

Tag: python

Python Regex: multiple regrex causing problem

A basic version of this problem is using an regex to translate something like abc like ‘%FFddsdE%’ into LOWER(abc) like ‘%ffddsde%’ and the following code works well However, everything crash down if we want to expand this problem a little bit, to both like and not like It gives LOWER(…

Update column based on grouped date values

Edited/reposted with correct sample output. I have a dataframe that looks like the following: This dataframe is split into groups by ID. I would like to make an updated combined column based on if df[‘bool’] == True, but only if df[‘bool’] == True AND there is another ‘finished&#…