Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. import tkinter as tk
  2. from tkinter import ttk
  3. from tkinter import *
  4. import pandas as pd
  5.  
  6.  
  7. window = tk.Tk()
  8.  
  9. #menubar = Menu(window)
  10.  
  11.  
  12. window.title('Automatic Extraction Of Examiners List')
  13. width = 500
  14. height = 500
  15. screen_width = window.winfo_screenwidth()
  16. screen_height = window.winfo_screenheight()
  17. window.geometry("%dx%d" % (width, height))
  18. window.resizable(1000,1000)
  19.  
  20. #file = Menu(window,menubar,tearoff=0)
  21. #menubar.add_cascade(label='File',menu=file)
  22.  
  23.  
  24. window.config(bg="white")
  25. #
  26. data = pd.read_csv("E:/ResumePDF/ResumeCSVv4.csv")
  27. #name = tk.StringVar()
  28. #nameEntered = ttk.Entry(window, width = 12, textvariable =name).grid(column= 4, row = 0)
  29.  
  30. variable = tk.StringVar()
  31. variable.set("Choose your subject") # default value
  32. w = ttk.OptionMenu(window, variable,"Choose your subject", "Big Data", "Machine Learning").place(x=200,y=50)
  33.  
  34. def click():
  35. if variable.get() == "Big Data":
  36. #lbl = ttk.Label(window).place(x= 200, y = 150)
  37. print("List For Big Data Examiners: n")
  38. data.sort_values("BigData", ascending=False, inplace=True)
  39. print(data[['Name','Email']],"n")
  40. #res = "This is a one"+ print(data1)
  41. #lbl.config(text=data1)
  42. lbl.data.get()
  43. #r = 0
  44. #for col in data:
  45. #c = 0
  46. #for row in col:
  47. # i've added some styling
  48. #label = ttk.Label(window, width = 10, height = 2, text =
  49. row, relief = ttk.RIDGE)
  50. #label.grid(row = 50, column = 100)
  51. #c += 1
  52. #r += 1
  53.  
  54.  
  55. elif variable.get() == "Machine Learning":
  56. print("List For Machine Learning Examiners: n")
  57. data.sort_values("MachineLearning", ascending=False, inplace=True)
  58. print(data[['Name','Email']],"n")
  59.  
  60. button = ttk.Button(window, text = "SHOW", command=click).place(x = 150 , y = 100)
  61. button1 = ttk.Button(window, text = "EXIT", command=window.destroy).place(x=300,y=100)
  62. lbl = ttk.Label(window).place(x= 200, y = 150)
  63.  
  64.  
  65.  
  66. window.mainloop()
  67.  
  68. from tkinter import *
  69.  
  70. root = Tk()
  71. scrollbar = Scrollbar(root)
  72. scrollbar.pack( side = RIGHT, fill = Y )
  73.  
  74. mylist = Listbox(root, yscrollcommand = scrollbar.set )
  75. for line in range(100):
  76. mylist.insert(END, "This is line number " + str(line))
  77.  
  78. mylist.pack( side = LEFT, fill = BOTH )
  79. scrollbar.config( command = mylist.yview )
  80.  
  81. mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement