Extract regex matches, and not groups, in data frames rows in Python
问题 I am a novice in coding and I generally use R for this (stringr) but I started to learn also Python's syntax. I have a data frame with one column generated from an imported excel file. The values in this column contain both capital and smallcase characters, symbols and numbers. I would like to generate a second column in the data frame containing only some of these words included in the first column according to a regex pattern. df = pd.DataFrame(["THIS IS A TEST 123123. s.m.", "THIS IS A