I have a dataframe that looks like this:
Film Description
0 Batman Viewed in 2021-10-04T14:30:31Z City Hall, London
1 Superman Aired 2012-01-04R11:01:10Z in the USA first
2 Hulk 2010-07-04S07:22:02Z Still being produced
I want to remove the date-time from each row in the 'Description' column, to look like this:
Film Description
0 Batman Viewed in City Hall, London
1 Superman Aired in the USA first
2 Hulk Still being produced
I have attempted this string regex:
df['Description'] = df['Description '].str.replace(r'\^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})Z', '')