title: How to loop appending script in python
body: <p>I want to make 200 correlation combination in my data, I have this so far and its work:</p>
  
  <pre><code>corr = pg.pairwise_corr(df_pvt, columns=[[df_pvt.columns[0]], list(df_pvt.columns)], method='pearson')[['X','Y','r']]
  corr_1 = corr.append(pg.pairwise_corr(df_pvt, columns=[[df_pvt.columns[1]], list(df_pvt.columns)], method='pearson')[['X','Y','r']])
  corr_2 = corr_1.append(pg.pairwise_corr(df_pvt, columns=[[df_pvt.columns[2]], list(df_pvt.columns)], method='pearson')[['X','Y','r']])
  corr_3 = corr_2.append(pg.pairwise_corr(df_pvt, columns=[[df_pvt.columns[3]], list(df_pvt.columns)], method='pearson')[['X','Y','r']])
  corr_4 = corr_3.append(pg.pairwise_corr(df_pvt, columns=[[df_pvt.columns[4]], list(df_pvt.columns)], method='pearson')[['X','Y','r']])
  ...
  corr_200
  </code></pre>
  
  <p>I need to loop this corr script so I dont have to write 200 rows of script.
  I have tried this but it only have 2 combinations:</p>
  
  <pre><code>corr = pg.pairwise_corr(df_pvt, columns=[[df_pvt.columns[0]], list(df_pvt.columns)], method='pearson')[['X','Y','r']]
  for var in list(range(1,10)):
      corr_all = corr.append(pg.pairwise_corr(df_pvt, columns=[[df_pvt.columns[var]], list(df_pvt.columns)], method='pearson')[['X','Y','r']])
      print(corr_all)
  </code></pre>
  
  <p>Any advice?</p>