0% found this document useful (0 votes)
8 views25 pages

CSV Result Analysis Program

The document outlines a project focused on result analysis using Python, specifically utilizing pandas and matplotlib for data handling and visualization. It includes a menu-driven program that allows users to fetch data, view statistics, display records, manipulate records and columns, search for specific data, and visualize results through various plots. The program is designed to read a CSV file containing student results and perform various analytical tasks based on user input.

Uploaded by

vermaankur409
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views25 pages

CSV Result Analysis Program

The document outlines a project focused on result analysis using Python, specifically utilizing pandas and matplotlib for data handling and visualization. It includes a menu-driven program that allows users to fetch data, view statistics, display records, manipulate records and columns, search for specific data, and visualize results through various plots. The program is designed to read a CSV file containing student results and perform various analytical tasks based on user input.

Uploaded by

vermaankur409
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PROJECT

ON
RESULT
ANALYSIS
Submitted by:
Student’sName:
Roll no:

CSV FILE
PROGRAM
import pandas as pd
import [Link] as plt
pd.set_option("max_columns",30)
pd.set_option("[Link]",1000)
result=pd.read_csv("C:\\Users\\harsh\\Desktop\\[Link]",nrows=100,)
# Main Menu
while True:
print("Main Menu")
print("1. Fetch data")
print("2. Dataframe Statistics")
print("3. Display Records")
print("4. Working on Records")
print("5. Working on Columns")
print("6. Search specific row/column")
print("7. Data Visualization")
print("8. Data analystics")
print("9. Exit")
ch=int(input("Enter your choice"))
if ch==1:
x=100
pd.set_option("display.max_rows",None)
pd.set_option("display.max_columns",None)
pd.set_option("[Link]",1000)
result=pd.read_csv("C:\\Users\\harsh\\Desktop\\[Link]")
print(result)
elif ch==2:
while (True):
print("Dataframe Statistics Menu")
print("1. Display the Transpose")
print("2. Display all column names")
print("3. Display the indexes")
print("4. Display the shape")
print("5. Display the dimension")
print("6. Display the data types of all columns")
print("7. Display the size")
print("8. Exit")
ch2=int(input("Enter choice"))
if ch2==1:
print(result.T)
elif ch2==2:
print([Link])
elif ch2==3:
print([Link])
elif ch2==4:
print([Link])
elif ch2==5:
print([Link])
elif ch2==6:
print([Link])
elif ch2==7:
print([Link])
elif ch2==8:
break
elif ch==3:
while(True):
print("Display Records Menu")
print("1. Top 5 Resords")
print("2. Bottom 5 Records")
print("3. Specific number of records from the top")
print("4. Specific number of records from the bottom")
print("5. Details of a specific Subject")
print("6. Display details of all subjects")
print("7. Exit")
ch3=int(input("Enter choice"))
if ch3==1:
print([Link]())
elif ch3==2:
print([Link]())
elif ch3==3:
n=int(input("Enter how many records you want to display from the
top"))
print([Link](n))
elif ch3==4:
n=int(input("Enter how many records you want to display from the
bottom"))
print([Link](n))
elif ch3==5:
st=input("Enter the subject name for which you want to see the
details")
print([Link][st])
elif ch3==6:
print("Results of XYZ school for the session 2018-19")
print(result)
elif ch3==7:
break
elif ch==4:
while(True):
print("Working on Records Menu")
print("1. Insert a specific subject Detail")
print("2. Delete a specific subject Detail")
print("3. Update a specific subject detail")
print("4. Exit")
ch4=int(input("Enter choice"))
if ch4==1:
a=input("Enter subject name")
b=int(input("Enter number of students appeared:"))
c=int(input("Enter highest marks obtained:"))
d=int(input("Enter average marks obtained"))
e=int(input("Enter number of A1's"))
f=int(input("Enter number of A2's"))
g=int(input("Enter percentage of A1 and A2's"))
h=int(input("Enter number of B1's"))
i=int(input("Enter number of B2's"))
j=int(input("Enter number of C1's"))
k=int(input("Enter number of C2's"))
l=int(input("Enter number of D1's"))
n=int(input("Enter number of D2's"))
m=int(input("Enter number of E's"))
[Link][len([Link])]=[a,b,c,d,e,f,g,h,i,j,k,l,n,m]
result.to_csv("C:\\Users\\harsh\\Desktop\\[Link]")
print("Data successfully inserted")
elif ch4==2:
a=input("Enter subject name whose data needs to be deleted")
ind = result[result["subject"]==a].index
[Link](ind,inplace=True)
result.to_csv("C:\\Users\\harsh\\Desktop\\[Link]")

print("Data successfully deleted")


elif ch4==3:
a=input("Enter subject name whose data needs to be updated")
b=int(input("Enter number of students appeared:"))
c=int(input("Enter highest marks obtained:"))
d=int(input("Enter average marks obtained"))
e=int(input("Enter number of A1's"))
f=int(input("Enter number of A2's"))
g=int(input("Enter percentage of A1 and A2's"))
h=int(input("Enter number of B1's"))
i=int(input("Enter number of B2's"))
j=int(input("Enter number of C1's"))
k=int(input("Enter number of C2's"))
l=int(input("Enter number of D's"))
n=int(input("Enter number of D2's"))
m=int(input("Enter number of E's"))
[Link][a]=[b,c,d,e,f,g,h,i,j,k,l,n,m]
print("Data successfully updated")
elif ch4==4:
break
elif ch==5:
while(True):
print("Working on Columns Menu")
print("1. Delete a specific column")
print("2. Exit")
ch5=int(input("Enter choice"))
if ch5==1:
a=input("Enter column name")
[Link]([a],axis=1,inplace=False)
print("Column Temporary deleted")
elif ch5==2:
break
elif ch==6:
while(True):
print("Search Menu")
print("1. Search for the details of a specific subject")
print("2. Search details of a specific as per a specific column heading")
print("3. Exit")
ch6=int(input("Enter choice"))
if ch6==1:
st=input("Enter the name of the subject whose details you want to
see")
result=pd.read_csv("C:\\Users\\harsh\\Desktop\\[Link]")
ind=result[result["subject"]==st].index
print([Link][ind])
elif ch6==2:
col=input("Enter column/heading name whose details you want to
see")
print(result[col])
elif ch6==3:
break
elif ch==7:
while(True):
print("Data Visualization Menu")
print("1. Horizontal Bar Plot")
print("2. Histogram")
print("[Link] graph")
print("4. Exit")
ch7=int(input("Enter choice"))
if ch7==1:
while(True):
print("Horizontal Bar Plot Sub Menu")
print("1. Subject wise Highest marks")
print("2. Subject wise number of students appeared")
print("3. Subject wise Average marks")
print("4. Subject wise comparison of percentage of A1 & A2")
print("5. Exit")
chbar=int(input("Enter choice"))
if chbar==1:
[Link]([Link],result['highest'],label="Highest Marks",
color="green")
[Link]("SUBJECTWISE HIGHEST MARKS")
[Link]("SUBJECTS")
[Link]("HIGHEST MARKS")
[Link]()
[Link]()
elif chbar==2:
[Link]([Link],result['average'],label="Average Marks
obtained",color="orange")
[Link]("SUBJECT WISE AVERAGE MARKS")
[Link]("SUBJECTS")
[Link]("AVERAGE MARKS")
[Link]()
[Link]()
elif chbar==4:
[Link]([Link],result['per'],label="Percentage of A1 and
A2",color="green")
[Link]("SUBJECT WISE PERCENTAGE OF A1 AND A2")
[Link]("SUBJECTS")
[Link]("PERCENTAGE OF A1 AND A2")
[Link]()
[Link]()
elif chbar==5:
break
elif ch7==2:
while(True):
print("Histogram Sub Menu [Showing 5 bins] ")
print("1. Highest marks")
print("2. Average Marks")
print("3. Percentagae of A1 and A2")
print("4. Exit")
chbar=int(input("Enter choice"))
if chbar==1:
[Link](result['highest'],bins=5,label="Highest
marks",color="green",edgecolor="black")
[Link]("COUNT OF SUBJECTS FOR DIFFERENT RANGE
OF HIGHEST MARKS ")
[Link]("HIGHEST MARKS")
[Link]("FREQUENCY")
[Link]()
[Link]()
elif chbar==2:
[Link](result['average'],bins=5,label="Average
Marks",color="yellow",edgecolor="black")
[Link]("COUNT OF SUBJECTS FOR DIFFERENT RANGE
OF AVERAGE MARKS")
[Link]("AVERAGE MARKS")
[Link]("FREQUENCY")
[Link]()
[Link]()
elif chbar==3:
[Link](result['per'],bins=5,label="Percentage of A1 &
A2",color="orange",edgecolor="black")
[Link]("COUNT OF SUBJECTS FOR DIFFERENT RANGE
OF PERCENTAGE OF A1& A2")
[Link]("PERCENTAGE OF A1 and A2")
[Link]("FREQUENCY")
[Link]()
[Link]()
elif chbar==4:
break
elif ch7==3:
[Link]([Link],result['highest'],label="Highest Marks")
[Link]("SUBJECTWISE HIGHEST MARKS")
[Link]("SUBJECTS")
[Link]("HIGHEST MARKS")
[Link](rotation=30)
[Link]()
[Link](True)
[Link]()
elif ch7==4:
break

elif ch==8:
while(True):
print("Data Analytics Menu")
print("1. Subject with maximum average marks")
print("2. Subject with minimum average marks")
print("3. Subject with maximum highest marks")
print("4. Subject with minimum highest marks")
print("5. Subject with maximum percentage of A1 and A2")
print("6. Subject with minimum percentage of A1 and A2")
print("7. Exit")
chana=int(input("Enter choice:"))
if chana==1:
m=result['average'].max()
s=[Link][[Link]==m]
print("Subject with maximum average marks of ",m," is\n ",[Link])
elif chana==2:
m=result['average'].min()
s=[Link][[Link]==m]
print("Subject with minimum average marks of ",m," is\n ",[Link])
elif chana==3:
m=result['highest'].max()
s=[Link][[Link]==m]
print("Subject with maximum highest marks of ",m," is\n ",[Link])
elif chana==4:
m=result['highest'].min()
s=[Link][[Link]==m]
print("Subject with minimum highest marks of ",m," is\n ",[Link])
elif chana==5:
m=result['per'].max()
s=[Link][[Link]==m]
print("Subject with maximum percentage of A1 and A2",[Link],"\n
Percentage being",m)
elif chana==6:
m=result['per'].min()
s=[Link][[Link]==m]
print("Subject with minimum percentage of A1 and A2",[Link],"\n
Percentage being",m)
elif chana==7:
break
elif ch==9:
break
OUTPUT
# DISPLAY SCREEN

# FETCH DATA
# DATAFRAME STATISTICS
# WORKING WITH RECORDS
# WORKING ON COLUMNS

# SEARCHING
# DATA Visualization
# DATA ANALYSIS

You might also like