title: how do i get the path from askfilename for another function
body: <p>i am unsure on how to get the file path to execute the year function, i have searched online but all i found were static path where mine requires to choose a file using askopenfilename</p>
  
  <pre><code>def file1():
      path1 = askopenfilename(initialdir="/desktop/songs", title="select file")
      path_lbl = Label(topframe, text="file path : " + path1).grid(row=0, column=1)
      return path1
  
  def year(x):
     data = pd.read_csv(x)
     for col in data.columns:
         if "year" in col.lower():
             year = list(data[col])
             year.sort(reverse=True)
             rangeyr = year[0] - year[-1]
             print rangeyr
         else:
             print "there is no data for year"
  print data
  
  base = Tk()
  base.geometry("500x250")
  base.title("data reader")
  
  Button(topframe, text="add path", command=file1).grid(row=0, column=0)
  
  Button(bottomframe, text="confirm", command=year(path1)).grid(row=10, column=3)
  
  base.mainloop()
  </code></pre>