title: Select n-th lowest value from DataFrame (Every Row!)
body: <p>I am looking for a solution to pick values (row wise) from a Dataframe.
  Here is what I already have:</p>
  <pre><code>np.random.seed(1)
  df = pd.DataFrame(np.random.randint(1,10, (10, 10)))
  df.columns = list('ABCDEFGHIJ')
  
  N = 2
  idx = np.argsort(df.values, 1)[:, 0:N]
  
  df= pd.concat([pd.DataFrame(df.values.take(idx), index=df.index), pd.DataFrame(df.columns[idx], index=df.index)],keys=['Value', 'Columns']).sort_index(level=1)
  </code></pre>
  <p>Now I have the index/position for every value but if I try to get the values from the Dataframe it only takes the values from the first row.
  What do I have to change in the code?</p>
  <p>df looks like:</p>
  <pre><code>   A  B  C  D  E  F  G  H  I  J
  0  6  9  6  1  1  2  8  7  3  5
  1  6  3  5  3  5  8  8  2  8  1
  2  7  8  7  2  1  2  9  9  4  9
  ....
  </code></pre>
  <p>My output should look like:</p>
  <pre><code>0  D E
  0  1 1
  1  J H
  1  1 2
  </code></pre>