daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Jan 16th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. temp = []
  2. for value in my_dataframe[my_col]:
  3.   match = my_regex.search(value)
  4.   if match:
  5.     temp.append(value.replace(match.group(1),'')
  6.   else:
  7.     temp.append(value)
  8.    
  9. temp = [value.replace(match.group(1)),'' if (match) else value for
  10.     value in my_dataframe[my_col] if my_regex.search(value)]
RAW Paste Data
Top