Skip to content

Commit

Permalink
all logics sucess
Browse files Browse the repository at this point in the history
  • Loading branch information
kvvsatyaravi committed May 7, 2021
1 parent e581b15 commit 5c08a1b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
Binary file modified Orders-With Nulls.xlsx
Binary file not shown.
12 changes: 11 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ def coldata():
print("Selected value :", optionVar.get())
print("selected column values:", specficcol)


def create_excel():
firstval = int(E1.get())
secondval = int(E2.get())
optionval = optionVar.get()
df_tech_select_columns = newData.loc[(newData[optionval] >= firstval) & (newData[optionval] <= secondval )]
print(df_tech_select_columns)
df_tech_select_columns.to_excel("./test.xlsx")

l1 = Label(window, text='Select Column:', width=15 )
l1.place(x=45,y=25)
optionVar = StringVar(root)
Expand All @@ -83,6 +92,7 @@ def coldata():
option.place(x=130,y=25)
l2 = Label(window, text='advanced filter :', width=15 )
l2.place(x=24,y=100)
selnum= StringVar(root)
E1 = Entry(window,width=10)
E1.place(x = 120,y = 100)
l3 = Label(window, text='from', width=15 )
Expand All @@ -94,7 +104,7 @@ def coldata():
btnShow = Button(window, text="Column values", command=coldata)
btnShow.place(x=130,y=50)

btnShow2 = Button(window, text="Submit")
btnShow2 = Button(window, text="Submit",command=create_excel)
btnShow2.place(x=130,y=150)

window.mainloop()
Expand Down
5 changes: 4 additions & 1 deletion note.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ install ruqerimentts command
Rules
1.)sheetname should be Sheet1 (default name)
2.)you should also see once your excel sheet whether it has any numiercal values there or not these code only supports for numerical/integer values
3.)
3.)

reference websites
https://pythoninoffice.com/filter-a-pandas-dataframe-or-and-not/
7 changes: 0 additions & 7 deletions testing modules.py

This file was deleted.

2 changes: 0 additions & 2 deletions testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ def create_excel():
def create_excel():
firstval = int(E1.get())
secondval = int(E2.get())


df_tech_select_columns = df.loc[(df['Sales'] >= firstval) & (df['Sales'] <= secondval )]
print(df_tech_select_columns)
df_tech_select_columns.to_excel("./test.xlsx")
Expand Down

0 comments on commit 5c08a1b

Please sign in to comment.