book' scope to give you flavorone variation on the above email regex gives names to the match groupsregex re compile( ""(? [ - - %+-]+(? [ - - -]+(? [ - ]{ , })"""flags=re ignorecase|re verbosethe match object produced by such regex can produce handy dict with the specified group namesin [ ] regex match('wesm@bright net'in [ ] groupdict(out[ ]{'domain''bright''suffix''net''username''wesm'table - regular expression methods argument description findallfinditer return all non-overlapping matching patterns in string findall returns list of all patterns while finditer returns them one by one from an iterator match match pattern at start of string and optionally segment pattern components into groups if the pattern matchesreturns match objectotherwise none search scan string for match to patternreturning match object if so unlike matchthe match can be anywhere in the string as opposed to only at the beginning split break string into pieces at each occurrence of pattern subsubn replace all (subor first occurrences (subnof pattern in string with replacement expression use symbols \ \ to refer to match group elements in the replacement string vectorized string functions in pandas cleaning up messy data set for analysis often requires lot of string munging and regularization to complicate mattersa column containing strings will sometimes have missing datain [ ]data {'dave''dave@google com''steve''steve@gmail com''rob''rob@gmail com''wes'np nanin [ ]data series(datain [ ]data out[ ]dave dave@google com rob rob@gmail com steve steve@gmail com wes nan in [ ]data isnull(out[ ]dave false rob false steve false wes true data wranglingcleantransformmergereshape www it-ebooks info