I'm trying to remove some strings in a dataframe that start with System:
My dataframe:
A B C
French house Blablabla System:Microsoft Windows XP; Browser:Chrome 32.0.1700;
English house my address: 101-102 bd Charles de Gaulle 75001 Paris
French apartment my name is Liam
French house Hello George!
English apartment System:Microsoft Windows XP; Browser:Chrome 32.0.1700;
I tried:
def remove_lines():
df['C'] = df['C'].str.replace(r'(\s+)(System:).+','')
return df
Nothing happens...
Good output:
A B C
French house Blablabla
English house my address: 101-102 bd Charles de Gaulle 75001 Paris
French apartment my name is Liam
French house Hello George!
English apartment