I have a dataframe with log error messages. The column we need looks something like this:
message
"System error foo"
"System error foo2"
"System error foo"
"System error foo"
"System error foo3"
I need to count all error messages, doesn't matter what kind of error they are.
Usually, if I knew a specific message, I'd filter a dataframe like this:
df2 = df[df['message'] == 'System error foo3.']
But how can I do this with all the messages that just contain "System error" plus whatever else goes after it? I tried it with the asterix, but it didn't work of course. Is there some sort of python or pandas native wildcard operator? Or do I need to use regex?