title: How to connect python program to a GUI interface
body: <p>I was wondering whether it is possible to connect already created python class to a gui interface with a button to obtain the data. I would like to create a window that will allow to write an input of &quot;filename&quot; and &quot;share&quot; variables for my class and button for get.data()
  here is my code:</p>
  <pre><code>class Loan:
  def __init__(self, filename, share=0):
     #read csv data
     self.data=pd.read_csv(filename)
     self.filename=filename
     self.data=self.data[['month','Probability','Payment', 'upb','current_interest_rate',
                           'delinquent_payment_count']]
    
     self.share= share
     
     
  
  def get_prn_bal1(self, p1, UPB):
      return p1 * UPB
  
         
  def get_int1(self, prn_bal1, current_interest_rate, month, DQ):
      return prn_bal1 * current_interest_rate/12 * (month+DQ+1)
  
  
  
  def get_data(self):
      
      self.data['Principal1'] = self.data.apply(lambda x: self.get_prn_bal1(x['Probability'], x['upb']), axis=1)
      self.data['Interest1'] = self.data.apply(lambda x: self.get_int1(x['Principal1'],x['current_interest_rate'], 
                                                                               x['month'], x['delinquent_payment_count']), axis=1)
      
      
     
      f = open(self.filename,&quot;w+&quot;)
      f.truncate()
      f.close()
      self.data.to_csv(self.filename, header=True, index=False)
  </code></pre>