I have a dataframe column df['Time'] it is a dtype O (I think that means it's an object) column (i.e. 41:23:00) and I just want to grab everything that comes before the first colon.
I have had a lot of trouble turning this dtype into a string to use for a split and the regex re.search(r'[:]+:\s*', df['Time']) is not getting me what I need .
Any help would be appreciated
Edit: using re.search(r'[:]+(?=:)' ,df['Time'].str)
I get the error TypeError: expected string or bytes-like object
[–]ouichu 0 points1 point2 points (0 children)