title: Can not merge pandas dataframe using loop for many times
body: <p>I have 4218 users id. What I want is to merge 4218 users information to the main data frame. I am using for loop ranging from 1 to 4218 but it crashes. But for loop works up to 1000. what is the problem?</p>
  <p>Here is my code:</p>
  <pre><code>idi=list(merged[&quot;UserID&quot;].unique())
  len(idi)
  
  for i in idi:
      userid_wise=merged[merged[&quot;UserID&quot;]==i]
      users_answer_text=userid_wise[['AnswerText','QuestionID']]
      asked_question=pd.merge(asked_question,users_answer_text,how='left',on='QuestionID')
  </code></pre>