Professional Documents
Culture Documents
Report File Siddharth
Report File Siddharth
(Term-2)
By
Siddharth Parakh
(Project)
Under Guidance
Of
Year of Submission
2022 - 2023
S.NO. Content
1. Certificate of Originality
2. Acknowledgement
3. Introduction to Project
4. Hardware Requirement
5. Software Requirement
6. Coding
7. Output
8. Bibliography
CERTIFICATE OF ORIGINALITY
This is to certify that the project report entitled “Hospital Data Analysis”
The matter embodied in this project is genuine work done by the student
and has not been submitted whether to this Board or to any other
……………………….……………
Signature of Teacher
……………………….……………
Date of Signature
ACKNOWLEDGEMENT
Primarily I would thank god for being able to complete this project
with success, then I would like to thank my principal Mrs.
Maitreyi Shukla and Informatics Practices teacher Mr.
Shyam Singh Sikarwar, whose valuable guidance has been
the ones that helped me patch this project and make it full proof
success. His suggestions and instructions have served as the major
contributor towards the completion of the project.
Then I would like to thank my parents and friends who have helped
me with their valuable suggestion and guidance has been very
helpful in various phases of the completion of the project.
Last but not the least I would like to thank my classmates who have
helped me a lot.
Siddharth Parakh
Class – 12 th C
1. Introduction of Project
This project is created to analyze the data of All Clinical Care Hospital
efficiency to manage big data sets and matplotlib library help us to analyze
This software, being simple in design and working, does not require much
of training to users, and can be used as a powerful tool for analyzing the
data of different doctors and patients and multiple graphs of the data.
Coding
import pandas as pd
import numpy as np
df = pd.DataFrame()
csv_file1= "G:\\Project\\csv1.csv"
csv_file2= "G:\\Project\\csv2.csv"
def hospital_data_analysis1():
df1 = pd.read_csv(csv_file1)
while 0<1:
print('*'*100)
print(" Welcome")
print('*'*100,"\n")
print(df1)
wait = input()
if ch1 == 2:
print(df1.columns)
wait = input()
if ch1 == 3:
print("\n",df1.columns,"\n")
print(df1[col_name])
wait = input()
if ch1 == 4:
df1=df1.drop(col_name,axis=1)
print(df1)
wait = input()
if ch1 == 5:
data={"doctor_id":a,"name":b,"department":c,"gender":d,"age":e,"cit
y":f,"salary":g,"year_of_joining":h,"year_of_experience":i,"no.of_patie
nts_attended_per_day":j,"no.of_surgeries":k,"grade":l}
df1 = df1.append(data,ignore_index=True)
print(df1)
wait = input()
if ch1==6:
print(df1.describe())
wait=input()
if ch1==7:
print(df1.loc[df1.doctor_id==i, : ])
wait = input()
if ch1 == 8:
if T == "H":
print(df1.head(col))
else:
print(df1.tail(col))
wait = input()
if ch1 == 9:
print(df1.columns)
if S == "A":
print(df1.sort_values(col_name))
else:
print(df1.sort_values(col_name,ascending= False))
wait=input()
if ch1 == 10:
break
def hospital_data_analysis2():
df2 = pd.read_csv(csv_file2)
while 0<1:
print('*'*100)
print(" Welcome")
print('*'*100,"\n")
if ch2 == 1:
print(df2)
wait = input()
if ch2 == 2:
print(df2.columns)
wait = input()
if ch2 == 3:
print("\n",df2.columns,"\n")
print(df2[col_name])
wait = input()
if ch2 == 4:
df2=df2.drop(col_name,axis=1)
print(df2)
wait = input()
if ch2 == 5:
data={"patient_id":a,"name":b,"gender":c,"age":d,"disease":e,"room"
:f,"ward-
number":g,"treated_by":h,"per_day_consultation_fee":i,"per_day_char
ge_of_room":j,"total_amountofperday":k}
df2 = df2.append(data,ignore_index=True)
print(df2)
if ch2==6:
print(df2.describe())
wait=input()
if ch2==7:
print(df2.loc[df2.patient_id==i, : ])
wait = input()
if ch2== 8:
if T == "H":
print(df2.head(col))
else:
print(df2.tail(col))
wait = input()
if ch2 == 9:
print(df2.columns)
if S == "A":
print(df2.sort_values(col_name))
else:
print(df2.sort_values(col_name,ascending= False))
wait=input()
if ch2 == 10:
break
def graph1():
df1 = pd.read_csv(csv_file1,index_col="doctor_id")
while True:
print('*'*100)
if ch1 == 1:
g = df1.groupby('department')
x = df1['department'].unique()
y = g['department'].count()
plt.plot(x,y,color="r")
plt.xticks(rotation='vertical')
plt.xlabel("Departments")
plt.grid(True)
plt.show()
if ch1 == 2:
g = df1.groupby('city')
x = df1['city'].unique()
y = g['city'].count()
plt.bar(x,y,color= 'r')
plt.xticks(rotation='vertical')
plt.xlabel("City")
plt.grid(True)
plt.show()
if ch1 ==3:
g = df1.groupby('grade')
x = df1['grade'].unique()
y = g['grade'].count()
plt.bar(x,y,color= 'c')
plt.xticks(rotation='vertical')
plt.xlabel("Grade")
plt.ylabel("Number of Doctors")
plt.grid(True)
plt.show()
if ch1 == 4:
break
def graph2():
df2 = pd.read_csv(csv_file2)
while True:
print('*'*100)
if ch2 == 1:
g = df2.groupby('disease')
x = df2['disease'].unique()
y = g['disease'].count()
plt.xticks(rotation='vertical')
plt.xlabel("Disease")
plt.grid(True)
plt.show()
if ch2 == 2:
g= df2.groupby('room')
x = df2['room'].unique()
y = g['room'].count()
plt.bar(x,y,color= 'm')
plt.xticks(rotation='vertical')
plt.xlabel("Room")
plt.grid(True)
plt.show()
if ch2 ==3:
x = df2['age']
plt.hist(x)
plt.xlabel("Age")
plt.grid(True)
plt.show()
if ch2 == 4:
break
hospital_data_analysis1()
graph1()
hospital_data_analysis2()
graph2()
print("Thanks For Visiting")
Output
Welcome Screen:
On selecting option 1
On selecting option 2
On selecting option 3
On selecting option 4
On selecting option 5
On selecting option 6
On selecting option 7
On selecting option 8
On selecting option 9
On selecting option 10
On selecting option 1 (In Graph Menu)
On selecting option 1
On selecting option 2
On selecting option 3
On selecting option 4
On selecting option 5
On selecting option 6
On selecting option 7
On selecting option 8
On selecting option 9
On selecting option 10
On selecting option 1 (In Graph Menu)
Bibliography
References:
Informatics Practices (by NCERT)
Informatics Practices (by Sumita Arora)
Data of CSV is secondary data obtained from various sites of
hospitals.