Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

1 | Page

2 | Page
S.No Contents Pg.no
1 Acknowledgement

2 Aim

3 Technical Details

4 Source Code

5 Output

6 Advantages

7 Disadvantages
8 Bibliography

3 | Page
ACKNOWLEDGEMENT

I take this opportunity to express my profound

gratitude and deep regards to my school

Principal Mr. T.Ramasubramanian for exemplar

guidance, monitoring and constant

encouragement throughout the year.

I also take this opportunity to express a deep

sense of gratitude to Mr. P.Muthukumar,


Informatics practices teacher, for his cordial

support, valuable information and enthusiastic

guidance throughout the year and the course of

the project.

4 | Page
Documentation

Aim
This project aims to provide a simple interface to view,

modify and visualize data from a CSV file. All of this is made

possible through the open sourced Pandas library.

Capabilities
The program houses a variety of functions to perform.
It can:

 Load a new CSV file.


 Create a DataFrame from the CSV file using Pandas.
 Add rows to the DataFrame.
 Modify a single value from the DataFrame.
 Delete Columns from the DataFrame.
 Delete Rows from the DataFrame.
 Plot Bar Graph, Line Graph and Histogram.
 Display Rows.
 Display columns
 Iterate through the DataFrame.
 Compare 2 columns numerically
 Display all/specific columns, row from the DataFrame
 Display Maximum/Minimum value from a column

5 | Page
Brief explanation of all functions

6 | Page
Technical Details

Software Used

 python version 6.8


 Python IDE
 Vscode

About Python

Python is a high-level, general-purpose programming


language. Its design philosophy emphasizes code readability
with the use of significant indentation. Python is dynamically
typed and garbage-collected. It supports multiple programming
paradigms, including structured, object-oriented and
functional programming.

Libraries Used

 Pandas
 Matplotlib
 Tkinter
 Tabulate
 Isense
 pyvb
 Colorama
 OS

7 | Page
Description:

Pandas

Main backend used to power the program, used for working


with the datasets.Pandas is a software library written for
the Python programming language for data manipulation and
analysis. In particular, it offers data structures and
operations for manipulating numerical tables and time
series

Matplotlib

Module used to plot data provided by the Pandas library,


this is what powers the Plotting functions.This module
serves as the backbone for creating various types of plots
and charts to represent data in a visually informative
manner. It enables users to seamlessly generate a wide
range of graphs, including bar plots, line plots,
histograms, and more. In essence, this module empowers
Pandas users to transform their tabular data into
meaningful visualizations, facilitating better insights and
understanding of the underlying data patterns and trends.

Tkinter

Module used to display small configuration windows for when


the user wants to plot data.

Tabulate

Module used to display pretty tables from DataFrame which


aren’t supported by the Pandas Library

Isense

Custom module used to suggest correct function names when


they spell it wrong. It doesn’t use any other library like
Regex (re).

8 | Page
Colorama

Module used to display colored output. It uses ANSI escape


codes to display colored outputs.

OS

Module used to change the shell window color.

pyvb

Custom Module used to display error box.

9 | Page
Source Code

#<>Import-----------------------------------------------------------
-

import tkinter as tk

from tabulate import tabulate

import pandas as pd

import matplotlib.pyplot as plt

import isense;import pyvb

import os

from colorama import Fore, init, Back

#</>Import----------------------------------------------------------
-

#<>BgSettings-------------------------------------------------------
-

os.system("color F1") #To change Shell colors

#</>BgSettings------------------------------------------------------
-

#<>Declarations-----------------------------------------------------
--

setgui = True

debugM = True

hasedited = False

functions_ = ["AddRow", "Bargraph",

"DeleteColumn", "exec_",

"DeleteRow",

"Edit", "Get", "Gets", "Help",

"Histogram", "Iterate", "Lineplot", "Loadfile", "Max","Menu",


"Min", "Modify", "Plot",

"Query", "Setindex", "Showcols", "Showrow", "close",


"dataframe","report", "save"]

10 | P a g e
init(autoreset=False)

#<>SystemFunctions-----------------//Added error handling//---------


--

def update():

ev = open("eval_.py","r")

code = ev.read()

exec(code)

def Main():

if setgui:

box.destroy()

Loadfile()

ui()

def auth():

unameTr = uname.get()

pwdr = pname.get()

if(unameTr=="" and pwdr == ""):

Main()

else:

ms = pyvb.messagebox("Wrong credentials entered!", "vbOK",


"Authorization" )

ms.execute()

def getfuncs():

file_r = open("funct.json","r")

functions_dict = json.load(file_r)

functions = functions_dict["functions"]

return functions

def printc(Msg,colr="RED"):

11 | P a g e
exec(f'print(Fore.{colr} + Back.LIGHTWHITE_EX + Msg)')

print(Fore.BLUE,Back.LIGHTWHITE_EX)

def autoeval(str_):

result = False

for x in functions_:

if(x == str_):

result = True

break

elif(x!=str_):

result=False

if(result==True):

exec(f"{str_}" + "()")

elif(result == False):

dym_ = isense.evaluate(str_)

if str_!="":

eRRN("No function matched",dym_)

elif str_ == "":

eRRN("No function matched")

def eval_(choice):

try:

y = eval(choice)

return y

except:

return str(choice)

def printdf(df_,hdr,fmt="psql"):

if fmt == "psql":

print(tabulate(df_,headers=hdr,tablefmt="psql"))

else:

print(tabulate(df_,headers=hdr,tablefmt=fmt))

12 | P a g e
def eRRC(v1=None,v2=None):

if(v1 != "" and v2 == None):

eRRN(f"Invalid column name '{v1}' !")

elif(v2 != "" and v2 == None):

eRRN(f"Invalid column name '{v2}' !")

elif(v1 != "" and v2 != ""):

eRRN(f"Invalid column name '{v1}' or '{v2}' !")

def eRRN(msg,dym=""):

#setcol("4F")

if dym == "":

printc(f'''

===================================================================

Error:\t{msg}

===================================================================

''')

if dym !="":

printc(f'''

===================================================================

Error:\t{msg} Did you mean "{dym}" ?

===================================================================

''')

def stOUT(out_):

printc(colr="GREEN",Msg=f'''

+----------------------------------------+

{out_}

+----------------------------------------+

''')

def Inf(msg):

printc(colr='GREEN',Msg = f'''

13 | P a g e
==========================================

(i) Info:\t{msg}

==========================================

''')

def printdbg(msg):

if debugM:

print(msg)

def dataframe():

printdf(df,"keys")

def sgst():

fn2 =
["Plot","Edit","report","save","dataframe","close","Menu","Help"]

print("\nchoose one:")

ss = pd.DataFrame(fn2)

#print(ss)

printdf(ss,["Index", "Functions"],fmt="fancy_outline")

#</>SystemFunctions-------------------------------------------------
-

#<>Initialize-------------------------------------------------------
-

isense.funcs = functions_

#</>Initialize------------------------------------------------------
--

#<>HelpFunctions----------//No error possible//---------------------

def Menu():

print('''

=> Select function name from the list below\n

=> Index values start from 0

14 | P a g e
''')

print("\n1) Loadfile\n2) Plot\n3) Edit\n4) report\n5) save\n6)


dataframe\n7) close\n8) Help")

def Help():

print('''

''')

#</>HelpFunctions---------------------------------------------------
--

#<>Report Functions------//Added error handling fully//-------------

def report():

printdf(df,"keys")

print("\n1) Showrow\n2) Showcols\3)Iterate\n4) Query\n5)


Get\n6)Gets\n7) Max\n8) Min")

ch = input("\nSelect operation:\t")

autoeval(ch)

15 | P a g e
def Showrow():

ch = eval_(input("\nEnter column name:\t"))

x = digestcols(ch)

if x:

Inf("Success!")

print("\n",df[ch])

else:

eRRC(v1=ch)

colsT(hlp=True)

def Showcols():

nlist = []

for i in df.columns:

nlist.append(i)

df__ = pd.DataFrame(nlist)

printdf(df__,["Index","Columns"])

def getcols():

cols__ = []

for i in df.columns:

cols__.append(i)

return cols__

def Iterate():

for (row,rowseries) in df.iterrows():

print("\nRowIndex:\t", row)

print("Values: ")

print(rowseries, "\n")

def Gets():

global dfGets

sf = False

sf1 = False

try:

ch = int(input("\nEnter no of column to be selected:\t"))

16 | P a g e
sf1 = True

except:

eRRN("String used instead of Int!")

if sf1:

clist = []

for i in range(ch):

ch1 = eval_(input(f"\nEnter column name {i}:\t"))

clist.append(ch1)

printdbg(clist)

rlist = []

srowidx = eval_(input("\nEnter starting row index:\t"))

erowidx = eval_(input("\nEnter ending row index:\t"))

try:

dfGets = df.loc[srowidx:erowidx,clist]

sf= True

except:

eRRN("Invalid column name or out of range index!")

if sf:

printdf(dfGets,clist)

def Max():

sf = False

clist=[]

ch = eval_(input("\nEnter column name:\t"))

try:

for i in df.columns:

clist.append(i)

maxL = list(df[ch])

m = maxL.index(max(maxL))

for ff in clist:

if ff!=ch:

17 | P a g e
print("\n",ff + ":\t",df.iat[m,clist.index(ff)])

sf = True

except:

eRRC(v1=ch)

colsT(hlp=True)

if sf:

stOUT(f"Max value is:\t{max(maxL)}")

def Min():

sf = False

ch = eval_(input("\nEnter Column name:\t"))

clist=[]

try:

for i in df.columns:

clist.append(i)

minL = list(df[ch])

n= minL.index(min(minL))

for ff in clist:

if ff!=ch:

print("\n",ff + ":\t",df.iat[n,clist.index(ff)])

sf = True

except:

eRRC(v1=ch)

colsT(hlp=True)

if sf:

stOUT(f"Min value is:\t{min(minL)}")

def Get(): #Handles set index

svalf = False

mvalf = False

18 | P a g e
ivalf = False

print("\n1) Single Value\n2) Multiple Columns")

option = input("\nEnter one of the options from

above:\t").lower()

if(option=="single value"):

colname= eval_(input("\nEnter column name:\t"))

rowidx = eval_(input("\nEnter row index/name:\t"))

try:

res = df[colname].get(rowidx)

svalf = True

except:

eRRN("Wrong column name or row index")

if svalf:

stOUT(f"Value:\t{res}")

elif(option=="multiple cols"):

colist = []

colist_ = ["Index"]

try:

nc = int(input("\nEnter number of columns:\t"))

ivalf = True

except:

eRRN("String used instead of Int!")

if ivalf:

for i in range(nc):

cnam = eval_(input(f"\nEnter column name

{i+1}:\t"))

colist.append(cnam)

colist_.append(cnam)

try:

res1 = df.get(colist)

19 | P a g e
for i in colist:

tt = df[i]

mvalf = True

except:

eRRN("One of the Column's not found in the

records!")

colsT(hlp=True)

if mvalf:

printdf(res1,colist_)

else:

eRRN("Invalid option!")

def Query():

sf = False

#Note: DataFrame.query('<condition>') fails when column

name has spaces, use backtick quoting to fix it.

#eg: column name = "C C" ==>df.query("A == `C C` ")

print("\nConditions:\n\n1) > or<\n2) ==\n\nexample:

{col1}=={col2}")

ch = eval_(input("\nEnter column name 1:\t"))

ch2 = eval_(input("\nEnter column name 2:\t"))

condi = eval_(input("\nEnter one condition from above list:\t"))

ll=[ch,ch2]

try:

rs = df.query(f"{ch} {condi} {ch2}")

sf = True

except:

eRRN("Wrong operation or column name!")

eRRC(v1=ch,v2=ch2)

colsT(hlp=True)

if sf:

20 | P a g e
printdf(rs,ll)

#</>Report Functions------------------------------------------------
--

#<>MainFunctions-------//Added error handling successfully//--------


--

def ui():

print("\n1) Plot\n2) Edit\n3) report\n4) save\n5)


dataframe\n6) close\n7) Menu\n8) Help")

while True:

sgst()

print("\n")

ch = input("\nEnter Function Name:\t")

autoeval(ch)

def Edit():

print("\n1) AddRow\n2) AddColumn\n3) Modify\n4) DeleteRow\n5)


DeleteColumn\n6) SetIndex")

def colsT(hlp=False):

lis = []

if hlp:

print("\nPlease refer to the below table for reference.")

for i in df.columns:

lis.append(i)

print("\n",tabulate(pd.DataFrame(lis),headers=["Index","Columns"],ta
blefmt="psql"))

def digestcols(cname):

clistd = []

for i in df.columns:

clistd.append(i)

if(cname in clistd):

21 | P a g e
return True

elif(cname==""):

return True

else:

return False

def Modify():

sf = False

sf1 = False

rval = eval_(input("\nEnter row index:\t"))

cval = eval_(input("\nEnter column name:\t"))

try:

val__ = df.at[rval,cval]

stOUT(f"Value isolated:\t{val__}")

sf1 = True

except:

eRRN("Invalid row index or column name!")

if sf1:

fval = eval_(input("\nEnter new value:\t"))

try:

df.at[rval, cval] = fval

sf=True

except:

eRRN("Invalid row index or column name!")

if sf:

printdf(df,"keys")

def Loadfile():

global df

22 | P a g e
global cols_lookup

global primary_index

sf = False

global filenameC

filenameC = input("\nEnter file path to open:\t")

try:

if(filenameC.endswith("csv")):

df = pd.read_csv(filenameC)

elif(filenameC.endswith("xlsx") or filenameC.endswith("xls")):

try:

df = pd.read_excel(filenameC,engine="openpyxl")

except ImportError:

eRRN("Openpyxl engine not found!")

Inf("Try pip install openpyxl")

time.sleep(2)

quit()

except FileNotFoundError:

eRRN("Excel File not found!")

time.sleep(2)

quit()

if(df.empty==True):

eRRN("Empty DataFrame!")

Loadfile()

if(df.shape[-1]>10):

Inf("\n\nDataFrame has too many columns\nIt might be difficult to


handle the program in default IDE\nDo you want to continue?")

chex = eval_(input("\nyes/no:\t"))

if chex == "no":

close()

23 | P a g e
sf = True

except:

eRRN("Csv File not found!")

Loadfile()

if sf:

printdf(df,"keys")

cols_lookup = [column for column in df.columns]

colsT()

try:

primary_index = cols_lookup.index(eval_(input("\nEnter
primary column:\t")))

except:

eRRN("Invalid column name given! refer to the above table for


available column names.")

Loadfile()

if df.empty:

eRRN("Empty DataFrame")

Loadfile()

def close():

Inf("Do you want to Save?")

ch = input("\nyes/no:\t")

if ch == "yes" or ch=="y" or ch=="Y" or ch=="YES":

save()

elif ch == "no" or ch=="n" or ch=="N" or ch=="NO":

quit()

else:

24 | P a g e
eRRN("Invalid option!")

def AddRow():

sf = False

ch = eval_(input("\nEnter row number/name:\t"))

row,col = df.shape;print(col)

print(f"\nThere are {col} no of columns in the DataFrame\n")

colvals = []

columns_ = getcols()

for i in range(col):

cl = eval_(input(f"\nEnter value for column


'{columns_[i]}':\t"))

colvals.append(cl)

try:

df.loc[ch]=colvals

sf = True

except:

eRRN("Expected row number!")

if sf:

printdf(df,"keys")

def AddColumn():

sf = False

global rowvals

try:

colnumber = int(input("\nEnter column number:\t"))

except:

eRRN("please enter a number!")

ui()

row,col = df.shape

print(f"\nThere are {row} no of rows in the dataframe")

25 | P a g e
colname = eval_(input("\nEnter column name:\t"))

rowvals = []

for i in range(row):

zch = eval_(input(f"\nEnter value to be entered in row


no:{i}:\t"))

if ch == "":

ch = "Null"

rowvals.append(ch)

try:

df.insert(colnumber,colname,rowvals)

sf = True

except:

eRRN("Column number not in range!")

if sf:

printdf(df,"keys")

def exec_():

exec(input("\n>>> "))

def save():

sf = False

print("\n1) csv\n2) html\n3) excel")

#Inf("Are you sure you want to overwrite? press enter\ntype


'no'.")

cnf = input("Enter option from above or press enter to


overwrite:\t")

if cnf =="":

df.to_csv(filenameC,index=False)

Inf("File overwritten successfully")

elif cnf =="html":

ext = input("\nEnter file name:\t")

df.to_html(ext+".html",index=False)

26 | P a g e
Inf("File saved as Html successfully")

elif cnf == "excel":

ext1 = input("\nEnter file name:\t")

df.to_excel(ext1 + "xlsx",engine="openpyxl",index=False)

Inf("File saved as Excel successfully")

elif cnf == "csv":

ext2 = input("\nEnter new filename:\t")

df.to_csv(ext2 + ".csv",index=False)

Inf("File saved as CSV successfully")

else:

eRRN("Invalid option!")

def Plot():

print("\n1) Bargraph\n2) Lineplot\n3) Histogram")

chz = input("\nEnter operation:\t")

autoeval(chz)

def DeleteColumn():

ch = eval_(input("\nEnter Column name:\t"))

try:

df.drop(ch, axis=1,inplace=True)

print("\nColumn deleted successfully")

printdf(df,"keys")

except:

eRRC(v1=ch)

colsT(hlp=True)

def DeleteRow():

ch=eval_(input("\nEnter Row index:\t"))

try:

df.drop(ch,inplace=True)

27 | P a g e
print("\nRow deleted successfully")

printdf(df,"keys")

except:

eRRN("Invalid rowindex/name!")

def Setindex():

ch = eval_(input("\nEnter column name for index:\t"))

try:

df.set_index(ch,inplace=True)

printdf(df,"keys")

except:

eRRC(v1=ch)

colsT(hlp=True)

#</>MainFunctions---------------------------------------------------
--

#<>PlotFunctions----------------------------------------------------
--

def barexp():

useindex = useindexvar.get()

stack = stacked_.get()

xval = entry1.get()

yval=entry2.get()

xlab = entry4.get()

ylab = entry5.get()

colr = entry3.get()

arglist = [xval,yval,colr]

cmd = "df.plot.bar("

idx=-1

if(xlab!=""):

if(ylab!=""):

28 | P a g e
cmd+="xlabel=" + '"' + xlab + '",'

cmd+="ylabel=" + '"' + ylab + '"'

elif(ylab == ""):

cmd+="xlabel=" + '"' + xlab + '"'

elif(xlab == ""):

cmd+="ylabel=" + '"' + ylab + '"'

for arg in arglist:

idx+=1

if(arg == xval != ""):

if(cmd[-1]!="," and xlab!="" and ylab!=""):

cmd+=","

cmd += "x=" + '"' + xval + '"'

if(arglist[idx+1]):

cmd+=","

elif(arg==yval != ""):

if(cmd[-1] !="," and xlab!="" and ylab!=""):

cmd+=","

cmd += "y=" + '"' + yval + '"'

if(arglist[idx+1]):

cmd+=","

elif(arg==colr != ""):

if(cmd[-1]!="," and xlab!="" and ylab!=""):

cmd+=","

cmd += "color=" + '"' + colr + '"'

try:

if(arglist[idx+1]):

cmd+=","

except:

29 | P a g e
cmd+=")"

if(cmd[-1]!=")" and idx==len(arglist)-1):

cmd+=")"

printdbg(cmd)

try:

exec(cmd)

plt.title("BarGraph")

plt.show()

except:

eRRC(v1=xval,v2=yval)

colsT(hlp=True)

def Bargraph():

global entry1

global entry2

global entry3

global entry4

global entry5

global useindexvar

global stacked_

global topb

topb = tk.Tk()

topb.geometry("400x270")

topb.title("Plot Bar Graph")

useindexvar = tk.IntVar()

stacked_ = tk.IntVar()

labelT = tk.Label(master=topb,text="Plot Bar",font = ("Roboto",


12,"bold","underline"))

30 | P a g e
labelT.place(relx=0.5,rely=0.11,anchor=tk.CENTER)

label1 = tk.Label(master = topb, text="x-axis", font =


("Roboto", 10))

label1.place(relx=0.15, rely=0.23, anchor=tk.CENTER)

entry1 = tk.Entry(master=topb)

entry1.place(relx=0.5, rely=0.23, anchor=tk.CENTER)

label2 = tk.Label(master = topb, text="y-axis", font =


("Roboto", 10))

label2.place(relx=0.15, rely=0.34, anchor=tk.CENTER)

entry2 = tk.Entry(master=topb)

entry2.place(relx=0.5, rely=0.34, anchor=tk.CENTER)

label3 = tk.Label(master = topb, text="color", font = ("Roboto",


10))

label3.place(relx=0.15, rely=0.67, anchor=tk.CENTER)

entry3 = tk.Entry(master=topb)

entry3.place(relx=0.5, rely=0.67, anchor=tk.CENTER)

label4 = tk.Label(master = topb, text="x-label", font =


("Roboto", 10))

label4.place(relx=0.15, rely=0.45, anchor=tk.CENTER)

entry4 = tk.Entry(master=topb)

entry4.place(relx=0.5, rely=0.45, anchor=tk.CENTER)

label5 = tk.Label(master = topb, text="y-label", font =


("Roboto", 10))

label5.place(relx=0.15, rely=0.56, anchor=tk.CENTER)

31 | P a g e
entry5 = tk.Entry(master=topb)

entry5.place(relx=0.5, rely=0.56, anchor=tk.CENTER)

rbut = tk.Button(master=topb, text="plot", command = barexp)

rbut.place(relx=0.5,rely=0.8,anchor=tk.CENTER)

topb.mainloop()

def linexp():

xval = entryLp1.get()

yval = entryLp2.get()

global topl

if(digestcols(xval) == True and digestcols(yval)==True):

if(xval=="" and yval == ""):

df.plot.line()

elif(xval!="" or yval!=""):

if xval:

df.plot.line(x=xval)

elif yval:

df.plot.line(y=yval)

elif(xval!="" and yval!=""):

df.plot.line(x=xval,y=yval)

plt.xlabel(xval)

plt.ylabel(yval)

plt.title(f"LinePlot")

plt.show()

else:

eRRC(v1=xval,v2=yval)

colsT(hlp=True)

def Lineplot():

32 | P a g e
global entryLp1

global entryLp2

topl = tk.Tk()

topl.geometry("300x170")

topl.title("Plot Line Graph")

labelLp1 = tk.Label(master = topl, text="x-value", font =


("Roboto", 10))

labelLp1.place(relx=0.15, rely=0.2, anchor=tk.CENTER)

entryLp1 = tk.Entry(master=topl)

entryLp1.place(relx=0.5, rely=0.2, anchor=tk.CENTER)

labelLp2 = tk.Label(master = topl, text="y-value", font =


("Roboto", 10))

labelLp2.place(relx=0.15, rely=0.4, anchor=tk.CENTER)

entryLp2 = tk.Entry(master=topl)

entryLp2.place(relx=0.5, rely=0.4, anchor=tk.CENTER)

rbut = tk.Button(master=topl, text="plot",width=12, command=linexp)

rbut.place(relx=0.5,rely=0.8,anchor=tk.CENTER)

topl.mainloop()

def histexp():

bins_r = entryHp1.get()

alpha_r = entryHp2.get()

if alpha_r:

alpha_ = float(alpha_r)

33 | P a g e
else:

alpha_ = alpha_r

if bins_r:

bins_ = int(bins_r)

else:

bins_ = bins_r

if(bins_!="" and alpha_==""):

df.plot.hist(bins=bins_)

elif(alpha_!="" and bins_==""):

df.plot.hist(alpha=alpha_)

elif(bins_!="" and alpha_!=""):

df.plot.hist(bins=bins_,alpha=alpha_)

elif(bins_=="",alpha_==""):

df.plot.hist()

plt.title("Histogram")

plt.show()

def Histogram():

global entryHp1

global entryHp2

toph = tk.Tk()

toph.geometry("300x170")

toph.title("Plot Histogram")

labelHp1 = tk.Label(master=toph, text = "Bins", font=("Roboto",


10))

labelHp1.place(relx=0.15, rely=0.32, anchor=tk.CENTER)

34 | P a g e
entryHp1 = tk.Entry(master=toph)

entryHp1.place(relx=0.5, rely=0.32, anchor=tk.CENTER)

labelHp2 = tk.Label(master = toph, text="Alpha", font =


("Roboto", 10))

labelHp2.place(relx=0.15, rely=0.52, anchor=tk.CENTER)

entryHp2 = tk.Entry(master=toph)

entryHp2.place(relx=0.5, rely=0.52, anchor=tk.CENTER)

pbut = tk.Button(master=toph, text="plot", width=15,


command=histexp)

pbut.place(relx=0.5,rely=0.8,anchor=tk.CENTER)

toph.mainloop()

#</>PlotFunctions---------------------------------------------------
--

#Gui----------------------------------------------------------------
--

if setgui:

box = tk.Tk()

screen_w = box.winfo_screenwidth()

screen_h = box.winfo_screenheight()

window_wd = 300

window_he = 250

x = (screen_w-window_wd)//2 -7

y = (screen_h-window_he)//2 -25

box.geometry(f"{window_wd}x{window_he}+{x}+{y}")

35 | P a g e
label = tk.Label(master=box, text="Enter credentials",
font=("Roboto",14,"underline","bold"))

label.place(relx=0.5, rely=0.17,anchor=tk.CENTER)

uname = tk.Entry(master=box,width=25)

uname.place(relx=0.6,rely=0.5,anchor=tk.CENTER)

uname_lab = tk.Label(master=box,text="Username:",
font=("Roboto",11))

uname_lab.place(x=20, y=113)

pname_lab = tk.Label(master=box,text="Password:",
font=("Roboto",11))

pname_lab.place(x=20, y=163)

pname = tk.Entry(master=box,width=25)

pname.place(x=180,y=175,anchor=tk.CENTER)

submit_b = tk.Button(master=box,text="Login",command=auth)

submit_b.place(relx=0.5, rely=0.85,anchor=tk.CENTER)

box.mainloop()

#</>Gui-------------------------------------------------------------
-

#<>==============================End================================
=#

36 | P a g e
Advantages

 Program has a simple user Interface with colored output


to ensure comfortable user experience in shell.
 Ability to suggest function names, when the user gets one
wrong. Program also features extensive error handling and
high feedback to the user.
 Features GUI interface for plotting data, as specifying
all information in shell for plotting would be a tedious
task for the user.
 It also has an authorization system.
 It also displays output in beautiful tables.

Disadvantages

 It is only a simple program that allows user to modify,


view and plot data from a CSV file, trying to manipulate
large volumes of data would be almost impossible for a
Non-GUIapplication.
 It can also run only on machines with python installed,
it is not featured in the EXE format for other computers
to run it.
 Program doesn’t offer wide variety of options for
modifying or saving data like other tools that are found
in the market such as Ms Excel.

37 | P a g e
Output

Edit

38 | P a g e
AddRow

Modify

39 | P a g e
DeleteRow

DeleteColumn

40 | P a g e
Report

Showrow

41 | P a g e
ShowCols

Iterate

42 | P a g e
Query

43 | P a g e
Gets

Max

44 | P a g e
Min

Get

45 | P a g e
Save

46 | P a g e
Help

Plot

47 | P a g e
48 | P a g e
49 | P a g e
50 | P a g e
Bibliography

Pandas:
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.max.html

Shell color:
https://www.oreilly.com/library/view/windows-2000-
quick/0596000170/ch06s08.html

Stack overflow:
https://stackoverflow.com

Preeti Arora:
IP reader class 12 2023 edition.

Submitted by
Raghavasimhan V
Naren SK
Sanjay M

XII-B

51 | P a g e

You might also like