title: Pandas: Using variables to create dataframe with one row and column names from variable names
body: <p>Suppose I have some variables in Python. I am trying to create a 1-row Pandas dataframe, where the column names are the variables' names and the values in the row are from the variables.</p>
  
  <p>For example, if I have this code:</p>
  
  <pre><code>pi  = 3.142
  e   = 2.718
  phi = 1.618
  </code></pre>
  
  <p>I would like a dataframe that conceptually looks like this:</p>
  
  <pre><code>     pi     e      phi
  0   3.142   2.718  1.618
  </code></pre>
  
  <p>I tried the following, but everything is in one column, and the variable names are not added:</p>
  
  <pre><code>df = pd.DataFrame(data=[pi, e, phi])
  df
  #        0
  # 0  3.140
  # 1  2.718
  # 2  1.618
  </code></pre>
  
  <p>Note that I'm trying to replicate the behavior of some of my older R code.</p>
  
  <pre><code>pi  &lt;- 3.142
  e   &lt;- 2.718
  phi &lt;- 1.618
  df  &lt;- data.frame(pi, e, phi)
  df
  #      pi     e   phi
  # 1 3.142 2.718 1.618
  </code></pre>