title: adding a column to a dataframe using user input pandas
body: <p>How to add a column using user input in pandas(python). How can the code be amended to achieve this?</p>
  <pre><code>sel= str(input(&quot;would you like to add a new column to df&quot;))
  if sel == &quot;yes&quot;:
     name=str(input(&quot;Name of new column to df&quot;))
     name=[]
     df= df.append(name)
  else:
      print(&quot;column not added&quot;)
  </code></pre>