title: Adding constant value column to spark dataframe
body: <p>I am using Spark version 2.1 in Databricks. I have a data frame named <code>wamp</code> to which I want to add a column named <code>region</code> which should take the constant value <code>NE</code>. However, I get an error saying <code>NameError: name 'lit' is not defined</code> when I run the following command: </p>
  
  <pre><code>wamp = wamp.withColumn('region', lit('NE'))
  </code></pre>
  
  <p>What am I doing wrong? </p>