title: How to use regex in mutate dplython to add new column
body: <p>With familiarity in R and dplyr, I was trying to complete one of my tasks in python using <code>dplython</code> and <code>pandas</code>.</p>
  <p>I am trying to create a new column in the data frame, which evaluates a column using regex and on pattern matching I give value = 1 else 0.</p>
  <pre><code>import dplython as dp 
  import pandas as pd 
  import re
  
  a = {'module_name':'eventOutput','module_tpye':'export'}
  b = {'module_name':'session','module_tpye':'export'}
  df = pd.DataFrame()
  master_data = (a,b)
  new_df = df.from_dict(master_data)
  dp_new_df = dp.DplyFrame(new_df)
  dp_new_df = dp_new_df &gt;&gt; dp.mutate(
    to_select=(
      1 
      if bool(re.match(r&quot;(.*)Output(.*)&quot;,dp.X.module_name)) 
      else 0
    )
  )
  </code></pre>
  <p>Getting Error as <em><code>TypeError: expected string or bytes-like object</code></em></p>
  <p>Expected Output:</p>
  <pre><code>module_name  module_tpye    to_select
  0  eventOutput      export          1
  1      session      export          0
  </code></pre>
  <p>Thanks From :
  Guy with high hopes on python</p>