title: How to add multiple user input data to a sigle dataframe?
body: <p>In the following code, I can store only up to two user inputs in the dictionary and concatenate them to a single dataframe. And if the same function is called again with different input, it overwrites the data entered before. How can I add multiple user input data to a single dataframe whenever the loop is running?
  class CreateMarklist:</p>
  <pre><code>def __init__(self):
      self.student_name=None
      self.student_marks=None
      self.df_1 = None
      self.df_2 = None
      self.df_3 = None
      self.dict_1=None
  
  def student_record(self):
      n=int(input(&quot;Enter number of students&quot;))
      for i in rage(n): 
          self.student_name=input(&quot;Enter student name&quot;)
          self.student_marks=int(input(&quot;Enter marks&quot;)
          self.df_1=pd.Dataframe([dict_1])
          self.dict_1= {
              &quot;Student Name&quot; :self.student_name,
              &quot;Marks&quot; : self.student_marks}      
          self.df_2=pd.Dataframe([self.dict_1]),index=[1])
          self.df_3=pd.concat([self.df_1,self.df_2])
      print(self.df_3)
  
  obj=CreateMarklist()
  obj.student_record()
  </code></pre>