A PROJECT REPORT ON
SUBJECT : INFORMATICS PRACTISES [065]
ACADEMIC YEAR : 2022 - 23
SUBMITTED BY : SUBMITTED TO :
Mrs. Preeti Taneja
BOARD ROLL NUMBER :
CLASS : XII
1
INDEX
Sr.No TITLE Pg.No
1 ACKNOWLEDGEMENT
2 PROJECT ANALYSIS
3 MODULES
4 FUNCTIONS
5 DETAILED DESCRIPTION OF PROJECT
6 OPTION PROVIDED
7 SCREENSHOTS
8 SOURCE CODE
9 BIBLIOGRAPHY
2
ACKNOWLEDGMENT
It is with pleasure that I acknowledge my sincere gratitude to
our teacher, Ms.Preeti Taneja who taught and undertook the
responsibility of teaching the subject Infromatics practices. I
have been greatly benefitted from her classes.
I am especially filled with gratitude to our principal Mrs. Mamta
Singh who has always been a source of encouragement and
support and without whose inspiration this project would not
have been a successful. I would like to place on record heartfelt
thanks to him.
I would also like to thanks my family for encouraging and
supporting me during my academics and providing me with
such facilities to make my future brighter.
Finally, I would like to express my sincere appreciation to all
the other student of my batch, their friendship and the fine times
that we all shared together.
3
PROJECT ANALYSIS
The medical store database project is designed t0 manage – “
Saraswati medical store ” using the concepts of python interface with
matplotlib and file handling system. This project helps to enter the
records in different data structures and store all records permanently
in files. Also, data analysis is done using different types of charts.
Admin can create new data structures as per requirements and also
can add , update , delete or search for a particular record in existing
date structures. The medical store database system consist of
different data structures like medicine name, manufacture date,
expiry date, cost, manufacturer, medicine type and medicine
specification. Here an individual password is given to the respective
admin so as they can enter into the system and can perform required
operations. The user is provide with the option to enter into different
data structures and wrangle with them. In case of entering any
incorrect data, appropriate validation will take place. The program
can be terminated whenever the user wants by selecting exit option.
4
MODULES
1) import getpass
It provides a secure way to handle the password prompts.
2) import subprocess
It allows you to connect with new processes.
3) import os
It provides commands to interact with operating system
4) import matplotlib
It selectively import the pyplot module for graphical
reperesentation of data.
5) import pandas
It helps you to create data structures and used as analyse
tools for the python programming language.
6) import numpy
It is fundamental package for scientific computing with
python and contains a powerful N-dimensional array object.
5
FUNCTIONS
1. getpass() :This function prints a prompt then reads input
from the user until they press return. This input is passed
back asa string to the caller.
1) subprocess.run() :
This subprocess module allows you to spawn new
processes , connect to their input/output/error , and
obtain thoer return codes. This module intends to replace
several older modules and functions.
2) exit() :
this function terminates the python program. The value
supplied as an argument to exit is returned to the
operationg system as the program’s return code or exit
code.
3) os.system() :
This method executes the command in a subshell.
6
DETAILED DESCRIPTION OF
THE PROJECT
There are four Data Frames name Medicine Table, Sold Table,
Stock Table and Supplier Table in this project. Each Data Frame’s
data is saved permanently into respective CSV files. And each
Data Frame’s data is analysed using different charts.
DATAFRAMES :
1) MEDICINE TABLE :
COLUMNS:
NAME , COST , MANUFACTURE DATE , EXPIRY DATE,
MANUFACTURER , TYPE , SPECIFICATION.
2) STOCK TABLE :
COLUMNS:
NAME , COST , MANUFACTURER , TYPE , STOCK.
3) SOLD TABLE :
COLUMNS:
NAME , COST , MANUFACTURER , SOLD.
4) SUPPLIER TABLE :
COLUMNS :
NAME , COST , MANUFACTURER / SUPPLIER.
7
OPTIONS PROVIDED
In this python menu driven program , numerous options are
provided such as :
There are two different interfaces to work
1) Admin Interface
2) User Interface
Options in admin interface :
To Create Data Frames
To Add records
To Update records
To Delete records
Exit
Options in user interface :
Search records
Exit
8
SCREEN SHOTS
1. Starting screen :
2. Admin Interface :
Creating Data Frame :
Medicine table
Stock table
9
Sold table
Supplier table
Adding data into Data Frame :
10
Modifying data into Data Frame :
Deleting data into Data Frame :
11
3. User Interface :
12
Searching in Tables :
Analysing Table :
Medicine Table
Analyse Table Using Graph :
Medicine Table
13
SOURCE CODE
1. Starting screen :
import subprocess
import os
os.system("cls")
print("="*75,"WELCOME TO MEDIAL STORE MANAGEMNET SYSTEM","="*75)
print("\n")
print("="*75,"SELECT THE INTERFACE IN WHICH YOU WANT TO
WORK","="*75)
print("(1).ADMIN INTERFACE")
print("(2).USER INTERFACE")
ch=int(input("ENTER YOUR CHOICE:"))
if ch==1:
subprocess.run("python ADMINLOGIN.py")
elif ch==2:
subprocess.run("python USERLOGIN.py")
else:
os.system("cls")
print("="*20,"ERROR !!!","="*20)
print("INVALID REQUEST")
exit()
2. Admin Interface :
import subprocess
import os
import getpass
os.system('cls')
print("="*75,"WELCOME TO LOGIN SCREEN FOR ADMIN","="*75)
uname=input("ENTER USERNAME:")
ps=getpass.getpass()
14
if uname=='ADMIN' and ps=="ADMIN@1234":
os.system('cls')
print("SELECT YOUR OPTION")
print('1. CREATE DATAFRAMES')
print('2. ADD RECORDS IN DATAFRAMES')
print('3. MODIFY RECORDS IN DATAFRAMES')
print('4. DELETE RECORDS IN DATAFRAMES')
print('5. Exit')
ch=int(input('ENTER YOUR CHOICE :'))
if ch==1:
subprocess.run('python CREATE.py')
elif ch==2:
subprocess.run('python ADD.py')
elif ch==3:
subprocess.run('python MODIFY.py')
elif ch==4:
subprocess.run('python DELETE.py')
elif ch==5:
exit()
else:
print('INVALID OPTION')
else:
print("INCORRECT USERNAME AND PASSWORD")
3. Create Data Frame :
import subprocess
import os
import pandas as pd
os.system('cls')
print('='*78)
print('='*20,"WELCOME TO DATAFRAME CREATION SCREEN",'='*20)
###############################################################
15
print("LETS'S CREATE DATAFRAME FOR MEDICINE TABLE")
med={}
temp={}
ch='y'
n=1
while ch=='y' or ch=='Y':
os.system('cls')
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
man=input("ENTER MANUFACTURE DATE:")
exp=input("ENTER EXPIRY DATE:")
x=input("ENTER MANUFACTURER NAME:")
typ=input("ENTER MEDICINE TYPE:")
spc=input("ENTER MEDICINE SPECIFICATION:")
temp['NAME']=name
temp['COST']=cost
temp['MANUFACTURE DATE']=man
temp['EXPIRY DATE']=exp
temp['MANUFACTURER']=x
temp['TYPE']=typ
temp['SPECIFICATION']=spc
med[n]=temp
temp={}
n=n+1
ch=input("DO YOU WANT TO ENTER MORE DATA? (Y/N) : ")
df=pd.DataFrame(med)
df1=df.T
df1.to_csv('MEDICINETABLE.csv',index=False)
print("MEDICINE DATA IS STORED SUCCESFULLY!!")
os.system('cls')
###############################################################
print("LETS'S CREATE DATAFRAME FOR MEDICINE STOCK TABLE")
16
stock={}
temp={}
ch='y'
n=1
while ch=='y' or ch=='Y':
os.system('cls')
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
x=input("ENTER MANUFACTURER NAME:")
typ=input("ENTER MEDICINE TYPE:")
st=int(input("ENTER AMOUNT OF MEDICINE STOCK LEFT:"))
temp['NAME']=name
temp['COST']=cost
temp['MANUFACTURER']=x
temp['TYPE']=typ
tmep['STOCK']=st
stock[n]=temp
temp={}
n=n+1
ch=input("DO YOU WANT TO ENTER MORE DATA? (Y/N) : ")
df=pd.DataFrame(stock)
df1=df.T
df1.to_csv('STOCKTABLE.csv',index=False)
print("MEDICINE STOCK DATA IS STORED SUCCESFULLY!!")
os.system('cls')
###############################################################
print("LETS'S CREATE DATAFRAME FOR MEDICINE SOLD TABLE")
sold={}
temp={}
ch='y'
n=1
while ch=='y' or ch=='Y':
17
os.system('cls')
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
x=input("ENTER MANUFACTURER NAME:")
sd=int(input("ENTER AMOUNT OF MEDICINES SOLD:"))
temp['NAME']=name
temp['COST']=cost
temp['MANUFACTURER']=x
tmep['SOLD']=sd
stock[n]=temp
temp={}
n=n+1
ch=input("DO YOU WANT TO ENTER MORE DATA? (Y/N) : ")
df=pd.DataFrame(sold)
df1=df.T
df1.to_csv('SOLDTABLE.csv',index=False)
print("MEDICINE SOLD DATA IS STORED SUCCESFULLY!!")
os.system('cls')
###############################################################
print("LETS'S CREATE DATAFRAME FOR MEDICINE SUPPLIER TABLE")
supplier={}
temp={}
ch='y'
n=1
while ch=='y' or ch=='Y':
os.system('cls')
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
x=input("ENTER MANUFACTURER \ SUPPLIER NAME:")
temp['NAME']=name
temp['COST']=cost
temp['MANUFACTURER \ SUPPLIER']=x
18
supplier[n]=temp
temp={}
n=n+1
ch=input("DO YOU WANT TO ENTER MORE DATA? (Y/N) : ")
df=pd.DataFrame(supplier)
df1=df.T
df1.to_csv('SUPPLIERTABLE.csv',index=False)
print("MEDICINE SUPPLIER DATA IS STORED SUCCESFULLY!!")
os.system('cls')
4. Add Data In Data Frame :
import subprocess
import os
import pandas as pd
os.system('cls')
print('='*20,"WELCOME TO ADD RECORDS SCREEN",'='*20)
print('SELECT APPROPIATE OPTION TO WORK')
print("1. ADD RECORDS IN MEDICINE TABLE")
print("2. ADD RECORDS IN MEDICINE STOCK TABLE")
print("3. ADD RECORDS IN MEDICINE SOLD TABLE")
print("4. ADD RECORDS IN MEDICINE SUPPLIER TABLE")
print("5. EXIT")
ch=int(input("ENTER YOUR CHOICE ... "))
###############################################################
if ch==1:
med=pd.read_csv('MEDICINETABLE.csv')
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
man=input("ENTER MANUFACTURE DATE:")
exp=input("ENTER EXPIRY DATE:")
x=input("ENTER MANUFACTURER NAME:")
typ=input("ENTER MEDICINE TYPE:")
19
spc=input("ENTER MEDICINE SPECIFICATION:")
med.at['new',:]=[name,cost,man,exp,x,typ,spc]
med.to_csv('MEDICINETABLE.csv',index=False)
os.system('cls')
print("MEDICINE DATA HAS BEEN STORED SUCCESSFULLY IN MEDICINE
TABLE")
###############################################################
elif ch==2:
stock=pd.read_csv('STOCKTABLE.csv')
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
x=input("ENTER MANUFACTURER NAME:")
typ=input("ENTER MEDICINE TYPE:")
st=int(input("ENTER AMOUNT OF MEDICINE STOCK LEFT:"))
stock.at['new',:]=[name,cost,x,typ,st]
stock.to_csv('STOCKTABLE.csv',index=False)
os.system('cls')
print("MEDICINE STOCK DATA HAS BEEN STORED SUCCESSFULLY IN
STOCK TABLE")
###############################################################
################
elif ch==3:
sold=pd.read_csv('SOLDTABLE.csv')
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
x=input("ENTER MANUFACTURER NAME:")
sd=int(input("ENTER AMOUNT OF MEDICINES SOLD:"))
sold.at['new',:]=[name,cost,x,sd]
sold.to_csv('SOLDTABLE.csv',index=False)
os.system('cls')
20
print("MEDICINE SOLD DATA HAS BEEN STORED SUCCESSFULLY IN SOLD
TABLE")
###############################################################
################
elif ch==4:
supplier=pd.read_csv('SUPPLIERTABLE.csv')
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
x=input("ENTER MANUFACTURER \ SUPPLIER NAME:")
supplier.at['new',:]=[name,cost,x]
supplier.to_csv('SUPPLIERTABLE.csv',index=False)
os.system('cls')
print("MEDICINE SUPPLIER DATA HAS BEEN STORED SUCCESSFULLY IN
SUPPLIER TABLE")
###############################################################
################
elif ch==5:
exit()
else:
print("INVALID OPTION!!!")
5. Modify Data In Data Frame :
import subprocess
import os
import pandas as pd
os.system('cls')
print('='*20,"WELCOME TO MODIFY RECORDS SCREEN",'='*20)
print('SELECT APPROPIATE OPTION TO WORK')
print("1. MODIFY RECORDS IN MEDICINE TABLE")
print("2. MODIFY RECORDS IN MEDICINE STOCK TABLE")
21
print("3. MODIFY RECORDS IN MEDICINE SOLD TABLE")
print("4. MODIFY RECORDS IN MEDICINE SUPPLIER TABLE")
print("5. EXIT")
ch=int(input("ENTER YOUR CHOICE:"))
###############################################################
if ch==1:
med=pd.read_csv('MEDICINETABLE.csv')
print("SEE MEDICINE TABLE RECORDS")
print(med)
no=int(input('ENTER THE RECORD NUMBER TO BE MODIFIED'))
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
man=input("ENTER MANUFACTURE DATE:")
exp=input("ENTER EXPIRY DATE:")
x=input("ENTER MANUFACTURER NAME:")
typ=input("ENTER MEDICINE TYPE:")
spc=input("ENTER MEDICINE SPECIFICATION:")
med.at[no,:]=[name,cost,man,exp,x,typ,spc]
med.to_csv('MEDICINETABLE.csv',index=False)
os.system('cls')
print("MEDICINE DATA HAS BEEN MODIFIED SUCCESSFULLY IN
MEDICINE TABLE")
###############################################################
elif ch==2:
stock=pd.read_csv('STOCKTABLE.csv')
print("SEE STOCK TABLE RECORDS")
print(stock)
no=int(input('ENTER THE RECORD NUMBER TO BE MODIFIED'))
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
x=input("ENTER MANUFACTURER NAME:")
22
typ=input("ENTER MEDICINE TYPE:")
st=int(input("ENTER AMOUNT OF MEDICINE STOCK LEFT:"))
stock.at[no,:]=[name,cost,x,typ,st]
stock.to_csv('STOCKTABLE.csv',index=False)
os.system('cls')
print("MEDICINE DATA HAS BEEN MODIFIED SUCCESSFULLY IN STOCK
TABLE")
###############################################################
elif ch==3:
sold=pd.read_csv('SOLDTABLE.csv')
print("SEE SOLD TABLE RECORDS")
print(sold)
no=int(input('ENTER THE RECORD NUMBER TO BE MODIFIED'))
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
x=input("ENTER MANUFACTURER NAME:")
sd=int(input("ENTER AMOUNT OF MEDICINES SOLD:"))
sold.at[no,:]=[name,cost,x,sd]
sold.to_csv('SOLDTABLE.csv',index=False)
os.system('cls')
print("MEDICINE DATA HAS BEEN MODIFIED SUCCESSFULLY IN SOLD
TABLE")
###############################################################
elif ch==4:
supplier=pd.read_csv('SUPPLIERTABLE.csv')
print("SEE SUPPLIER TABLE RECORDS")
print(supplier)
no=int(input('ENTER THE RECORD NUMBER TO BE MODIFIED'))
name=input("ENTER MEDICINE NAME:")
cost=int(input("ENTER COST OF MEDICINE:"))
23
x=input("ENTER MANUFACTURER \ SUPPLIER NAME:")
supplier.at[no,:]=[name,cost,x]
supplier.to_csv('SUPPLIERTABLE.csv',index=False)
os.system('cls')
print("MEDICINE DATA HAS BEEN MODIFIED SUCCESSFULLY IN SUPPLIER
TABLE")
###############################################################
elif ch==5:
exit()
else:
print("INVALID OPTION!!!")
6. Delete Data In Data Frame :
import subprocess
import os
import pandas as pd
os.system('cls')
print('#'*20,"WELCOME TO DELETE RECORDS SCREEN",'#'*20)
print('SELECT APPROPIATE OPTION TO WORK')
print("1. DELETE RECORD IN MEDICINE TABLE")
print("2. DELETE RECORD IN MEDICINE STOCK TABLE")
print("3. DELETE RECORD IN MEDICINE SOLD TABLE")
print("4. DELETE RECORD IN MEDICINE SUPPLIER TABLE")
print("5. EXIT")
ch=int(input("Enter your choice..."))
###############################################################
if ch==1:
med=pd.read_csv('MEDICINETABLE.csv')
print("SEE MEDICINE TABLE RECORD")
print(med)
no=int(input('ENTER THE RECORD NUMBER TO BE DELETED:'))
24
os.system('cls')
print('THE RECORD IS AT',no,'IS:')
print(med.loc[no,:])
confirm=input('ARE YOU SURE YOU WANT TO DELETE THIS RECORD
PERMANENTLY?(Y/N)):')
if confirm=='Y':
med=med.drop(no)
print(med)
med.to_csv('MEDICINETABLE.csv',index=False)
os.system('cls')
print("MEDICINE RECORD HAS BEEN DELETED SUCCESSFULLY FROM
MEDICINE TABLE")
else:
os.system('cls')
print("MEDICINE RECORD HAS NOT BEEN DELETED FROM MEDICINE
TABLE")
###############################################################
elif ch==2:
stock=pd.read_csv('STOCKTABLE.csv')
print("SEE STOCK TABLE RECORD")
print(stock)
no=int(input('ENTER THE RECORD NUMBER TO BE DELETED:'))
os.system('cls')
print('THE RECORD IS AT',no,'IS:')
print(stock.loc[no,:])
confirm=input('ARE YOU SURE YOU WANT TO DELETE THIS RECORD
PERMANENTLY?(Y/N)):')
if confirm=='Y':
stock=stock.drop(no)
print(stock)
stock.to_csv('STOCKTABLE.csv',index=False)
os.system('cls')
25
print("MEDICINE RECORD HAS BEEN DELETED SUCCESSFULLY FROM
STOCK TABLE")
else:
os.system('cls')
print("MEDICINE RECORD HAS NOT BEEN DELETED FROM STOCK
TABLE")
###############################################################
elif ch==3:
sold=pd.read_csv('SOLDTABLE.csv')
print("SEE SOLD TABLE RECORD")
print(sold)
no=int(input('ENTER THE RECORD NUMBER TO BE DELETED:'))
os.system('cls')
print('THE RECORD IS AT',no,'IS:')
print(sold.loc[no,:])
confirm=input('ARE YOU SURE YOU WANT TO DELETE THIS RECORD
PERMANENTLY?(Y/N)):')
if confirm=='Y':
sold=sold.drop(no)
print(sold)
sold.to_csv('SOLDTABLE.csv',index=False)
os.system('cls')
print("MEDICINE RECORD HAS BEEN DELETED SUCCESSFULLY FROM
SOLD TABLE")
else:
os.system('cls')
print("MEDICINE RECORD HAS NOT BEEN DELETED FROM SOLD
TABLE")
###############################################################
elif ch==4:
supplier=pd.read_csv('SUPPLIERTABLE.csv')
print("SEE SUPPLIER TABLE RECORD")
26
print(supplier)
no=int(input('ENTER THE RECORD NUMBER TO BE DELETED:'))
os.system('cls')
print('THE RECORD IS AT',no,'IS:')
print(supplier.loc[no,:])
confirm=input('ARE YOU SURE YOU WANT TO DELETE THIS RECORD
PERMANENTLY?(Y/N)):')
if confirm=='Y':
supplier=supplier.drop(no)
print(supplier)
supplier.to_csv('SUPPLIERTABLE.csv',index=False)
os.system('cls')
print("MEDICINE RECORD HAS BEEN DELETED SUCCESSFULLY FROM
SUPPLIER TABLE")
else:
os.system('cls')
print("MEDICINE RECORD HAS NOT BEEN DELETED FROM SUPPLIER
TABLE")
###############################################################
elif ch==5:
exit()
else:
print("INVALID OPTION")
7. User Interface :
import subprocess
import os
import getpass
os.system('cls')
print('='*75,"WELCOME TO LOGIN SCREEN FOR USER",'='*75)
print("\n")
uname=input("ENTER YOUR USERNAME:")
27
ps=getpass.getpass()
if uname=='USER' and ps=='USER@1234':
os.system('cls')
print(' '*15,'SELECT OPTION TO WORK')
print("1. SEARCH \ ANALYSE MEDICINE TABLE")
print("1. SEARCH \ ANALYSE MEDICINE STOCK TABLE")
print("1. SEARCH \ ANALYSE MEDICINE SOLD TABLE")
print("1. SEARCH \ ANALYSE MEDICINE SUPPLIER TABLE")
print('5. Exit')
ch=int(input('ENTER YOUR CHOICE:'))
if ch==1:
subprocess.run('python MEDICINETABLE.py')
elif ch==2:
subprocess.run('python STOCKTABLE.py')
elif ch==3:
subprocess.run('python SOLDTABLE.py')
elif ch==4:
subprocess.run('python SUPPLIERTABLE.py')
elif ch==5:
exit()
else:
print('Invalid option')
else:
print('!!!!PLEASE CHECK YOUR USERNAME AND PASSWORD!!!!')
28
8. Medicine Table :
import os
import pandas as pd
import matplotlib.pyplot as pt
os.system('cls')
print('='*20,"WELCOME TO VIEW MEDICINE TABLE RECORD",'='*20)
print('SELECT OPTION TO SEARCH AS PER YOUR REQUIREMENT')
print("1. SEARCH VALUES IN MEDICINE TABLE")
print("2. ANALYSE MEDICINE TABLE")
print("3. ANALYSE MEDICINE TABLE USING GRAPH")
print("4. EXIT")
ch=int(input("ENTER YOUR CHOICE:"))
if ch==1:
med=pd.read_csv('MEDICINETABLE.csv')
os.system('cls')
print("COLUMNS IN MEDICINE TABLE ARE:",med.columns)
c=input('ENTER COLUMN NAME IN WHICH YOU WANT TO SEARCH : ')
v=input('ENTER VALUE TO BE SEARCHED : ')
if v in med[c].values:
os.system('cls')
print(v,"IS PRESENT IN MEDICINE TABLE'S COLUMN : ",c)
else:
os.system('cls')
print(v,"IS NOT PRESENT IN MEDICINE TABLE'S COLUMN ",c)
elif ch==2:
print("MEDICINE TABLE : ")
med=pd.read_csv('MEDICINETABLE.csv')
os.system('cls')
print(med)
elif ch==3:
med=pd.read_csv('MEDICINETABLE.csv')
print('ANALYSE MEDICINE TABLE DETAILS USING GRAPH : ')
29
med.plot('NAME','COST')
pt.show()
elif ch==4:
exit()
else:
print("INVALID OPTION")
9. Stock Table :
import os
import pandas as pd
import matplotlib.pyplot as pt
os.system('cls')
print('='*20,"WELCOME TO VIEW MEDICINE STOCK RECORD",'='*20)
print('SELECT OPTION TO SEARCH AS PER YOUR REQUIREMENT')
print("1. SEARCH VALUES IN STOCK TABLE")
print("2. ANALYSE STOCK TABLE")
print("3. ANALYSE STOCK TABLE USING GRAPH")
print("4. EXIT")
ch=int(input("ENTER YOUR CHOICE:"))
if ch==1:
stock=pd.read_csv('STOCKTABLE.csv')
os.system('cls')
print("COLUMNS IN STOCK TABLE ARE:",stock.columns)
c=input('ENTER COLUMN NAME IN WHICH YOU WANT TO SEARCH : ')
v=input('ENTER VALUE TO BE SEARCHED : ')
if v in stock[c].values:
os.system('cls')
print(v,"IS PRESENT IN STOCK TABLE'S COLUMN : ",c)
else:
os.system('cls')
print(v,"IS NOT PRESENT IN STOCK TABLE'S COLUMN ",c)
elif ch==2:
30
print("STOCK TABLE : ")
med=pd.read_csv('STOCKTABLE.csv')
os.system('cls')
print(stock)
elif ch==3:
stock=pd.read_csv('STOCKTABLE.csv')
print('ANALYSE STOCK TABLE DETAILS USING GRAPH : ')
stock.plot('NAME','STOCK')
pt.show()
elif ch==4:
exit()
else:
print("INVALID OPTION")
10. Sold Table :
import os
import pandas as pd
import matplotlib.pyplot as pt
os.system('cls')
print('='*20,"WELCOME TO VIEW MEDICINE SOLD TABLE RECORD",'='*20)
print('SELECT OPTION TO SEARCH AS PER YOUR REQUIREMENT')
print("1. SEARCH VALUES IN MEDICINE SOLD TABLE")
print("2. ANALYSE MEDICINE SOLD TABLE")
print("3. ANALYSE MEDICINE SOLD TABLE USING GRAPH")
print("4. EXIT")
ch=int(input("ENTER YOUR CHOICE:"))
if ch==1:
sold=pd.read_csv('SOLDTABLE.csv')
os.system('cls')
print("COLUMNS IN SOLD TABLE ARE:",sold.columns)
c=input('ENTER COLUMN NAME IN WHICH YOU WANT TO SEARCH : ')
v=input('ENTER VALUE TO BE SEARCHED : ')
31
if v in sold[c].values:
os.system('cls')
print(v,"IS PRESENT IN SOLD TABLE'S COLUMN : ",c)
else:
os.system('cls')
print(v,"IS NOT PRESENT IN SOLD TABLE'S COLUMN ",c)
elif ch==2:
print("SOLD TABLE : ")
sold=pd.read_csv('SOLDTABLE.csv')
os.system('cls')
print(sold)
elif ch==3:
sold=pd.read_csv('SOLDTABLE.csv')
print('ANALYSE MEDICINE SOLD TABLE DETAILS USING GRAPH : ')
sold.plot('NAME','SOLD')
pt.show()
elif ch==4:
exit()
else:
print("INVALID OPTION")
11. Supplier Table :
import os
import pandas as pd
import matplotlib.pyplot as pt
os.system('cls')
print('='*20,"WELCOME TO VIEW MEDICINE SUPPLIER TABLE
RECORD",'='*20)
print('SELECT OPTION TO SEARCH AS PER YOUR REQUIREMENT')
print("1. SEARCH VALUES IN SUPPLIER TABLE")
print("2. ANALYSE SUPPLIER TABLE")
print("3. ANALYSE SUPPLIER TABLE USING GRAPH")
32
print("4. EXIT")
ch=int(input("ENTER YOUR CHOICE:"))
if ch==1:
supplier=pd.read_csv('SUPPLIERTABLE.csv')
os.system('cls')
print("COLUMNS IN SUPPLIER TABLE ARE:",supplier.columns)
c=input('ENTER COLUMN NAME IN WHICH YOU WANT TO SEARCH : ')
v=input('ENTER VALUE TO BE SEARCHED : ')
if v in supplier[c].values:
os.system('cls')
print(v,"IS PRESENT IN SUPPLIER TABLE'S COLUMN : ",c)
else:
os.system('cls')
print(v,"IS NOT PRESENT IN SUPPLIER TABLE'S COLUMN ",c)
elif ch==2:
print("SUPPLIER TABLE : ")
supplier=pd.read_csv('SUPPLIERTABLE.csv')
os.system('cls')
print(supplier)
elif ch==3:
supplier=pd.read_csv('SUPPLIERTABLE.csv')
print('ANALYSE MEDICINE SUPPLIER TABLE DETAILS USING GRAPH : ')
supplier.plot('NAME','MANUFACTURER \ SUPPLIER')
pt.show()
elif ch==4:
exit()
else:
print("INVALID OPTION")
33
BIBLIOGRAPHY
https://www.geeksforgeeks.org/
https://www.edureka.co/
https://stackoverflow.com/
Informatics practises : A textbook for class XII (IP textbook)
34