Nov-12-2020, 09:02 AM
Hi,
How do I select a value from a column in my df, a value that start with a character, small or capital followed by numbers.
This is my code
How do I select a value from a column in my df, a value that start with a character, small or capital followed by numbers.
This is my code
search = ["S", "s"] bool_series = df["UserName"].str.startswith(tuple(search), na = False) df = results[bool_series]So I want a value that starts with S or s then followed by any numbers. E.g I don't want S98OS1, but S78345