title: How to get unique key in pandas dataframe without hardcode the variable
body: <p>Here my <code>Dataset_A</code></p>
  <pre><code>Unique_Key     Column_A     Column_B    Column_C    ...    Column X
  </code></pre>
  <p>And my <code>df</code></p>
  <pre><code>Columns     Table
  Columns_C     Dataset_A
  Columns_G     Dataset_B
  </code></pre>
  <p>Here's what I do</p>
  <pre><code>a = df[df['Table'] == 'Table_A']
  acols = a['Column'].tolist()
  Dataset_A = pd.read_csv(&quot;Selected_Agreement.csv&quot;)
  Dataset_A[acols]
  </code></pre>
  <p>FYI <code>Dataset_A</code>, <code>Dataset_B</code>, ..., <code>Dataset_G</code> has same <code>Unique_Key</code>. When I want to merge selected column for machine learning purpose the <code>Unique_Key</code> is not selected. How to get `Unique_Key' in pandas dataframe without hardcode the variable, so in other words, instead of</p>
  <pre><code>[In]  acols
  [Out] ['Column_A', 'Column_F', 'Column_H']
  </code></pre>
  <p>I need</p>
  <pre><code>[In]  acols
  [Out] ['Unique_Key','Column_A', 'Column_F', 'Column_H']
  </code></pre>