I want to extract a particular pattern from a content string: "Twitter for iPhone"
Try df.col.str.extract(pat = '(Twitter for (iPhone|Samsung|others))')
I want to extract "Twitter for iPhone" part from this string.
But I have different values in the place of "Twitter for iPhone" in 1000s of columns in a dataframe. I only need the values after ">" and before "<" from the following set of strings.
I tried df.col.str.extract('(Twitter for iPhone|Twitter for Samsung|Twitter for others)') which extracts only those 'Twitter for iPhone' values but not the others and the rest are filled with NaNs.