I'm working with the following DataFrame column containing Date |TimeStamp | Name | Message as a string
59770 [08/10/18, 5:57:43 PM] Luke: Message
59771 [08/10/18, 5:57:48 PM] Luke: Message
59772 [08/10/18, 5:57:50 PM] Luke: Message
I use the following function to capture the Date.
def getdate(x):
res = re.search("\d\d/\d\d/\d\d",x)
and the following code to capture the rest of the data (TimeStamp | Name | Message) into columns:
df['Data'].str.extract(r'\s*(.{10})](.*):(.*)')
Is there a workaround to capture and extract all 4 entities together?
Please Advise