title: Python - How to store values from a while loop into a pandas dataframe?
body: <p>I am trying to get the values from my list and store them into a dataframe</p>
  
  <pre><code>while (rank &lt; len(get_rank)) and (summoner_name &lt; len(get_summoner_name)) and (tier &lt; len(get_tier)) and (lp &lt; len(get_LP)) and (wr &lt; len(get_wr)):
          contains1 = get_rank[rank]
          rank += 1
          rank_list = [rank for rank in contains1]
          df = pd.DataFrame({'A':rank_list[0]},index = [0])
          print(df)
  </code></pre>
  
  <p><strong>My <code>rank_list</code>outputs:</strong></p>
  
  <pre><code>[1]
  [2]
  [3]
  </code></pre>
  
  <p><strong>My <code>rank_list[0]</code> outputs:</strong></p>
  
  <pre><code>1
  2
  3
  </code></pre>
  
  <p><strong>My current output:</strong></p>
  
  <pre><code>   A
  0  1
     A
  0  2
     A
  0  3
  </code></pre>
  
  <p><strong>My desired output:</strong></p>
  
  <pre><code>   A
  0  1
  1  2
  2  3
  </code></pre>