Professional Documents
Culture Documents
Ip Project Class Xii
Ip Project Class Xii
SUBMITTED BY -:
DATE :
BOARD ROLL NUMBER: 22266513
Last but not least | would like to thank all my friends who
supported me all the way and my parents who helped me
financially and encouraged me throughout the the completion of
the project.
AIM: To analyse the Result of class
XII Half Yearly.
Introduction to PANDAS...............
. Introduction to DATAFRAME............
. About the topic.............. cee eee
free &
Open © - Orortavitity
Source
Highly
Readable
Memory
Manage © .
ment
Clean
Visual
Layout
Features
Python Matplotlib
e Line Plot | ;
Plotting Techniques: * Scatter Plot | \
e Histogram
Bar Chart \
— ——
INTRODUCTION TO PANDAS
Pandas can clean messy data sets, and make them readable and
relevant.
e Max value?
e Min value?
Pandas are also able to delete rows that are not relevant, or
PYTHON PANDAS
An Introduction for
Data Science
data
gyio
Introduction to DATAFRAME
Panda’s object.
index.
f ’
Columns
Name Team Number Position Age
Boston Celtics
Rows
Boston Celtics
4 Terry Rozier
5 Jared Sullinger
6
38 VIVEK ANAND 50 44 30 56 67
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.read_csv("C:\\Users\\skmal\\Documents\\ip project\\
IP_PROJECT1.csv",index_col=0)
“print(df.to_string())"
5. EXIT")
if choice1 :
print("\nDATA VISUALISATION")
print("1. Line Graph")
print("2. Vertical Bar Graph")
print("3. Horizontal Bar Graph")
print("4. Histogram")
print("5. EXIT")
choice2 = int(input("Enter your choice: "))
if choice2 1:
df.plot(color=['k', ‘red’, ‘yellow’, ‘blue’, ‘green'])
plt.title("Result Analysis Of Class XII Half Yearly")
plt.xlabel("ROLL NUMBERS”)
plt.ylabel("Marks scored in English, Mathematics, Physics, Chemistry, IP")
plt.show()
elif choice2
df.plot(kind="bar", color=['k', ‘red’, ‘yellow’, ‘blue’, ‘green’ ])
plt.title("Result Analysis Of Class XII Half Yearly")
plt.xlabel("ROLL NUMBERS")
plt.ylabel("Marks scored in English, Mathematics, Physics, Chemistry, IP")
plt.show()
elif choice2
df.plot(kind="barh", color=['k', ‘red’, ‘yellow’, ‘blue’, ‘green'])
plt.title("Result Analysis Of Class XII Half Yearly")
plt.xlabel("ROLL NUMBERS")
plt.ylabel("Marks scored in English, Mathematics, Physics, Chemistry, IP")
plt.show()
elif choice2
df.plot(kind="hist", color=[‘k', ‘red’, ‘yellow’, ‘blue’, ‘green'])
plt.title("Result Analysis Of Class XII Half Yearly")
plt.xlabel("ROLL NUMBERS")
plt.ylabel("Marks scored in English, Mathematics, Physics, Chemistry, IP")
plt.show()
elif choice2 ==
break
else:
print("CHOICE NOT VALID!
elif choicel == 2:
print("\nDATA MANIPULATION")
print("1. Insert a column in the dataframe”)
print("2. Insert a row in the dataframe")
i . Delete column in the dataframe")
+ Delete a row in the dataframe")
+ Rename a column in the dataframe")
EXIT")
choice3 = int(input("Enter your choice: "))
a
a
a
a
if choice3 1
n = input("Enter the column you want to insert: ")
listi = []
print("Enter the no. of elements in the list: ")
m = int(input())
print("Enter the list of values: ")
for i in range(@, m):
a = float(input())
list1.append(a)
df .loc nl = list
print("Enter the list of values: ")
for i in range(@, m):
a = float(input())
list1.append(a)
df.loc[:, n] = list1
print(df.to_string())
elif choice3 :
n = input("Enter the row you want to insert: ")
listi = []
print("Enter the no. of elements in the list: ")
m = int(input())
print("Enter the list of values:
for i in range(@, m):
a = float(input())
list1.append(a)
df.loc[n, :] = list1
print(df.to_string())
elif choice3 == 3:
col = input("Enter the column you want to delete: ")
del df[col]
print(df.to_string())
elif choice3
row = input("Enter the row you want to delete: ")
df.drop([row], inplace=True)
print(df.to_string())
elif choice3
col = input("Enter the column you want to rename: ")
new_col = input(“Enter the new column name: “)
df.rename(columns={col: new_col}, inplace=True)
print(df.to_string())
elif choice3 ==
break
else:
print("CHOICE NOT VALID!")
elif choicel == 3:
if choicea 1
dfi = df.sort_values("“NAME")
print(df1.to_string())
elif choicea 2:
df1 = df.sort_values(“MATHEMATICS")
print(dfi[["“NAME", "MATHEMATICS" ]].to_string())
elif choicea as
df1 = df.sort_values("ENGLISH")
print(dfi[[“NAME", "ENGLISH" ]].to_string())
elif choicea 4:
df1 = df.sort_values("PHYSICS")
print(dfi[["NAME", "PHYSICS" ]].to_string())
elif choicea ae
dfi = df.sort_values("CHEMISTRY")
print(df1[["“NAME", "CHEMISTRY" ]].to_string())
elif choicea 6:
dfi = df.sort_values("IP")
print(df1[["NAME","IP"]].to_string())
elif choicea Ts
dfi = df.idxmax()
print(df1.to_string())
elif choicea == 8:
dfa = df.idxmin()
print(df1.to_string())
elif choicea ==
break
else:
print("CHOICE NOT VALID! !!")
break
elif choicel == 4:
print("\nSTATISTICAL ANALYSIS")
print("1. find a percentile of the dataframe")
find standard deviation")
print("3. find variance”)
print("4. find the total description of the dataframe")
print("5. find all the information of the dataframe")
print("6. EXIT")
choice5 = int(input("Enter your Choice: "))
if choices == 1:
n = float(input("Enter the percentile you want to find (in %)
if n==25:
n 75
dfi=df.quantile(q=n,axis=1)
print(df1.to_string())
elif choice5 == 2:
df1 = df.std(axis=0, skipna=True, numeric_only=True)
print(df1.to_string())
elif choice5 == 3:
df1 = df.var(axis=@, skipna=True, numeric_only=True)
print(df1.to_string())
f .quantile(q=n,axis=1)
print(df1.to_string())
elif choices == 2:
df1 = df.std(axis=0, skipna=True, numeric_only=True)
print(df1.to_string())
elif choices ==
dfi = df.var(axis=0, skipna=True, numeric_only=True)
print(df1.to_string())
elif choices == 4:
df1 = df.describe()
print(df1.to_string())
elif choices == 5:
print(df.info())
elif choices
break
else:
print("CHOICE NOT VALID!!!")
break
elif choice1
break
else:
print("CHOICE NOT VALID!!!")
break
& Figure 1
@#€9 $Q2
& Figure 1
N w 2S w a ~
oS 3 f=} =} f=} 3
fan
°
- o x
Result Analysis Of Class XII Half Yearly
70
65
60
55
50
45
40
— ENGLISH
35 | —— MATHEMATICS
—— PHYSICS
— CHEMISTRY
307 —— IP
0 5 10 15 20 25 30 35 40
Subjects
x=19.27 y=68.34
OPTION2- VERTICAL BAR GRAPH
= o x
Result Analysis Of Class XII Half Yearly
Mmm ENGLISH
@mmm MATHEMATICS
“PHYSICS
Mmm CHEMISTRY
m= IP
| !
AWN EMO HAO oAa aA as SOBA AN OSV OR CES asa er os a
AF A Ft TFT FA TF TF A NNNNNNNONONONO OM MM mannan nm
Ss ts
E> $Q2
x= y=41.4
OPTIONS — HORIZONTAL BAR GRAPH
%& Figure 1
IP
ENGLISH
MATHEMATICS
PHYSICS
CHEMISTRY
BRB RBRRERPNNNNNNNNNNWUWWWWWW WW
BNWEUMDIOOOPNWAUAIOOSOPNWAUADIDOSOSOHNWEOAIOO
@¢% $Q= 68
OPTION4 - HSTOGRAM
% Figure 1
30 40
Subjects.
50
60
fay
° N
&€¢9 QE
50
Subjects
ENGLISH
MATHEMATICS,
PHYSICS
CHEMISTRY
IP
70
x=55.20 y=10.52
OPTION = INSERT A COLUMNIN THE DATAFRAME
DATA MANPLLATION
File Edit
your choice: 1
the column you wan
the no. of eleme!
in the list
Ln: 34 Cok 2
RESUT-
eS
NAME,
ROLL NUMBERS
1 ABHIJEET
2 ABHIJEET KR JAISWAL
3 AMRIT KUMAR
4 ANANT
5 ANTARA PANDEY
6 ANUSKA BARIK
7 ARYAN KUMAR SINGH
8 AYUSH ANAND
9 AYUSH ANAND
10 AYUSH RAT
ll DEEPANJAN MALLICK
12 DHRUV SUNDAR CHAR
13 DIVYANSHU ACHARYA
14 HARSH RAJ
15 ISHAN SINGH
16 JYOTIKA KUMARI
17 KIRTI JAIN
18 KUMAR HARSHIT
19 KUMAR PARVEEN
20 MANJAY MIRNAL
21 MD EHTESHAM KALIM
22 OM PRAKASH
23 PIYUSH KANDHWEY
24 "AM KUMAR
25 PRIYANSHU BHUSHAN
26 RITESH RANJAN
27 SANYOG KUMAR PANDEY
28 SHASHWAT SINGH
29 SHIVAM KUMAR
30 SHRUTI MANGUAL
31 SUDHANSHU KUMAR
32 SOMYA KANDHWEY
33 SOURISH CHOWDHURY
34 SURYA RANJAN SINGH
35 SWAPNIL TIRKEY
36 TANISHQ KUMAR MISHRA
37 VISHWAJEET KUMAR
38 VIVEK ANAND
ENGLISH MATHEMATICS
PHYSICS
CHEMISTRY
PHYSICAL EDUCATION
ON
65.
60505505505 500500500500500500550550050
ln: 98 Col: 76
OPTION2 — INSERT A ROWINTHE DATARRAME
2. Data Manipulation
3. Data Analysis
4. Statistical Analysis
5. EXIT
DATA MANIPULATION
1. Insert a column in the dataframe
6. EXIT
69
68
66
65
70
Warning (from _warninas module):
Ln: 106 Col: 19
RESULT -
(4 *IDLE Shell 3.10.5* - o x
File Edit Shell Debug Options Window Help
2 ABHIJEET KR JAISWAL 67.0 45.0 56.0 60.0 56.0
3 AMRIT KUMAR 58.0 57.0 34.0 59.0 54.0
4 ANANT KUMAR 66.0 42.0 55.0 68.0 68.0
5 ANTARA PANDEY 64.0 55.0 47.0 55.0 61.0
6 ANUSKA BARIK 50.0 54.0 65.0 64.0 62.0
7 ARYAN KUMAR SINGH 65.0 62.0 56.0 67.0 52.0
8 AYUSH ANAND 60.0 43.0 54.0 64.0 53.0
9 AYUSH ANAND 59.0 45.0 41.0 58.0 51.0
10 AYUSH RAJ 68.0 35.0 43.0 62.0 50.0
11 DEEPANJAN MALLICK 55.0 57.0 53.0 65.0 52.0
12 DHRUV SUNDAR CHAR 64.0 54.0 65.0 68.0 45.0
13 DIVYANSHU ACHARYA 67.0 61.0 66.0 52.0 57.0
14 HARSH RAJ 64.0 48.0 68.0 61.0 42.0
15 ISHAN SINGH 58.0 64.0 56.0 48.0 55.0
16 JYOTIKA KUMARI 62.0 57.0 55.0 43.0 54.0
17 KIRTI JAIN 65.0 48.0 42.0 64.0 62.0
18 KUMAR HARSHIT 68.0 43.0 40.0 43.0 43.0
19 KUMAR PARVEEN 52.0 64.0 49.0 52.0 45.0
20 MANJAY MIRNAL 61.0 43.0 68.0 53.0 35.0
21 MD EHTESHAM KALIM 58.0 52.0 36.0 44.0 57.0
22 OM PRAKASH 67.0 53.0 33.0 37.0 54.0
23 PIYUSH KANDHWEY 62.0 44.0 37.0 46.0 61.0
24 PRITAM KUMAR 52.0 37.0 59.0 65.0 43.0
25 PRIYANSHU BHUSHAN 55.0 46.0 45.0 46.0 56.0
RITESH RANJAN 60.0 65.0 58.0 58.0 67.0
27 SANYOG KUMAR PANDEY 63.0 46.0 39.0 39.0 66.0
28 SHASHWAT SINGH 64.0 43.0 45.0 45.0 59.0
29 SHIVAM KUMAR 66.0 36.0 56.0 56.0 41.0
30 SHRUTI MANGUAL 51.0 53.0 34.0 34.0 52.0
31 SUDHANSHU KUMAR 68.0 65.0 38.0 38.0 53.0
32 SOMYA KANDHWEY 61.0 58.0 44.0 44.0 57.0
33 SOURISH CHOWDHURY 57.0 45.0 56.0 56.0 67.0
34 SURYA RANJAN SINGH 55.0 53.0 34.0 45.0 46.0
35 SWAPNIL TIRKEY 70.0 46.0 55.0 55.0 44.0
36 TANISHQ KUMAR MISHRA 58.0 65.0 69.0 53.0 54.0
37 VISHWAJEET KUMAR 53.0 46.0 58.0 56.0 56.0
38 VIVEK ANAND 50.0 44.0 30.0 56.0 67.0
39 ROHIT SHARMA 69 68 66 65 10
Ln: 22 Cok 0
OPTIONS — DELETE A COLLMNINTHE DATAFRAME
DATA MANIPULATION
ya ONE
hoi
lumn you want to «
MATHEMATICS
NAME ENGLISH PHY:
ROLL NUMBERS
by 65 66
2 56 60 56
3 34 59 54
4 55 8
5 ANTARA PANDEY 1
6 AD A BARIK
8 AYUSH ANAND
9 AY ANAND
AYUSH RAT
DEEPANJAN MALLICK
DHRUV SUNDAR CHAR
DIVYANSHU ACHARYA
HARSH RAJ
ISHAN SINGH 6
JYOTIKA KUMARI 55
KIRTI JAIN 42
KUMAR PARVEEN
MANJAY MIRNAL
ae nw ow
TO
AAG aMe
Loew
Ln: 111 Col: 19
in the dataframe
the dataframe
the dataframe
the dataframe
n in the dataframe
MATHEMATICS
ABHI
ABHIJEET KR
IKA KUMARI
KIRTI JAIN
wAE IT
1. Insert a
Insert a
n in the dataframe
the dataframe
the dataframe
the dataframe
in the dataframe
your cho
Enter the column you want to rename: IP
INFORMATION PRACT
1 ABHIJEET 52 44 65
2 ABHIJEET KR JA 1 45 56 60
3 AMRIT KUMAR 57 34 59
4 ANANT KUMAR 42 5S 68
5 ANTARA PANDEY 55 a? 55
ANUSKA BARIK 54 65 64
AYUSH ANAND 43 54 64 53
AYUSH ANAND 45 41 58 51
AYUSH RAT 35 43 62 so
DIVYANSHU ACHARYA 61 66 52 57
HARSH RAZ 48 68 61 42
ISHAN SING! 64 56 4e 55
JYOTIKA KUMARI 57 55 43 54
KIRTI JAIN 48 42 64 62
KUMAR HARSHIT 43 40 3 43
64 49 52 45
43 68 53 35
MD EHTESHAM KALIM 52 36 44 Ss?
OM PRAKAS 53 33 37 54
23 PIYUSH KANDHWEY 44 37 46 61
24 PRITAM KUMAR 31 $9 65 43
25 PRIYANSHU BRUSRKAN 46 45 56
26 RITESH RANJAN 65 58 67
28 SHWAT S 43 45 45 59
29 KUMA! 3€ Sé Sé 41
30 SHRUTI MANGUAL 53 34 34 52
31 SUDHANSHU KUMAR 65 38 38 53
32 SOMYA KANDHWEY 58 44 44 57
33 SOURISH CHOWDHURY 45 5é sé 67
10.5* _
3
x
2 “IDLE Shell 3
Chemistry Marks
of IP Marks
INFORMATION PRACTICI
66
JEET KR JAI 56
54
61
NUSKA BARTK 50 54 65 64 52
AYUSH ANAND 60 43 S4 64 53
AYUSH RAT 68 35 43 62 50
58 64 56 48 55
62 57 55 43 54
6s 46 42 64 62
a 43 40 43 43
52 64 43 52 45
61 43 8 5: 5
a 52 36 44 57
67 53 33 37 54
62 44 aT 46 61
PRITAM 52 31 89 5 43
PRIVANSHU BHUSHAN 55 46 4s 46 56
ITESH RANJAN 60 6s sa 86 67
SANYOG KUMAR PANDEY 63 46 39 39 66
SHASHWAT SINGH 64 43 4s 45 sg
66 36 56 56 41
si 53 34 34 52
61 58 44 44 57
ST 45 56 56 67
68 65 38 38 53
ss 53 34 4s 46
70 46 5S 55 44
58 65 6s 53 54
53 46 53 56 56
50 44 30 56 67
417 Cok 19
File
DATA ANALYSIS
1. Sort the dataframe on the basis of Name
- Exit
Enter your Choice: 2
NAME MATHEMATICS
ROLL NUMBERS
10
AYUSH RAT 35
29 SHIVAM KUMAR 36
24 PRITAM KUMAR 37
4 ANANT KUMAR 42
20 MANJAY MIRNAL 43
28 SHASHWAT SINGH 43
18 KUMAR HARSHIT 43
8 AYUSH ANAND 43
23 PIYUSH KANDEWEY aa
38 VIVEK ANAND 44
33 SOURISH CHOWDHURY 45
2 ABHIJEET KR JAISWAL 45
9 AYUSH ANAND 45
25 PRIYANSHU BAUSHAN 46
35 SWAPNIL TIRKEY 46
27 SANYOG KUMAR PANDEY 46
37 VISHWAJEET KUMAR 46
14 RSH RAT 48
17 KIRTI JAIN 48
1 ABHIJEET 52
au MD EHTESHAM KAZI 52
22 OM PR 53
34 SURYA RAN. INGH 53
30 SHRUTT MANGHAT. 53
6 ANUSKA BARII 54
12 DHRUV SUNDAR C1 54
5 ANTARA PANDEY 55
3 IT Kl 57
16 JYOTIKA XUMAR; 57
32 SOMYA KANDEWEY 58
13 DIVYANSHU ACHARYA el
7 ARYAN KUMAR SINGH €2
15 ISHAN SINGH €4
19 KUMAR PARVEEN €4
26 RITESH RANJAN és
a1 SUDMANSIIU KUMAR 6s
36 TANISHQ KUMAR MISHRA és
ANALYSIS
DATA
ex your Choice: 3
NAME
ROLL NUMBERS
38 VIVER ANAND
é ANUSKA BARIK
30 SHRUTI MANGUAL
24 PRITAM BUMAR
18 KUMAR PARVEEN
a -ABHIJEET
37 VISHWAJEET KUMAR
34 SINGH
25 SHAN
33 DHURY
36
21
26 ESH RANJAN
20 MANJAY MIRNAL
32
23
16
14
17
29
13
22
18
10 CUSH RAT
31 SUDHANSHU KUMAR
35 SWAPNIL TIRKEY
Window Help
Name
Mathematics Marks
English Marks
Physics Marks
IP Marks
ENGLISH
basis of
basis ¢.
basis
basis
basis
basis
Une
dalalcame on Lae
Homannaannd
exit
nzer your Choice: 4
NAME
ROLL NUMBERS
38 VIVEX ANAND
HARSH RAT
TANISHQ KUMAR MISHRA
PHYSICS
ia)
Nene
mathematics Marks
English Marks
Physics Marks
Chemistry Marks
IP Marks
Ln: 73 Cok 19
OPTIONS — SORT ONTHE BASIS OF C-EMISTRY MARKS
File
Ere
Edit Shell
DATA ANALI
1. Sort the
2. Sort the
3. Sort the
4. Sort the
5. Sort the
6. Sort the
7. Name
8. Name
9. Exit
ROLL NUMBERS
NAME
SHRUTI MANGUAL
OM PRAKASH
of
of
of
of
of
of
Name
Physi
cs Ma’
Chemistry Marks
IP Marks
CHEMISTRY
Shell 3.10.5"
Debug Wek
2. Daza Manipulation
3. Daza Analysi
4. Statistical Analysis
Ei
EXIT
mter your chcice: 3
DATA ANALYSIS
Sort ths dataframe on ths basis of Name
ENGLISH 5
MATHEMATICS 26
PHYSICS 36
CHEMISTRY 4
dlype: inves
3. Nana Analysis
4. Statistical Analysis
In:39 Cok 19
DATA ANALYSTS
1 the dataframe on the basis of Name
WEIR BWN
o
i
R
o
st
S
Poo
a
By
o
i
ty
W
B
B
0
9
8
st
S
0
Exit
Enter your Choice: 7
ENGLISE 3
MATHEMATICS = 2
PHYSICS 3
CHEMISTRY
1?
dcype: inte4
5
6
6
4
4
2. Data Manipulation
3. Date Analysis
4. Statistical analysis
5. EXIT
DATA ANALYSIS
Sort the dataframe on the basis of Name
ENGLISE 6
MATHEMATICS 10
PHYSICS 38
CHEMISTRY 30
Ip 20
2. Data Nanipulets on
3. Data Analysi:
4, Statistical bnalysis
Ei
EXIT
nter your choice
Ln: 64 Col: 19
STATISTICAL ANALYSIS
OPTION] - TO AND A PERCENTILE OF THE DATAFRAVE
STATISTICAL ANALYSIS
. To find a percentile of the dataframe
3. To find variance
B
R
L 2
2 56
3 54
a 55
5s 85
6 54
7 56
8 53
8 as
io 43
dl 53
1284
130057
23
240043
246
26 «5B
2738
284s
2900 4
300034
310038
32d
33°56
340045
3346
360084
3783
a x
Ln: 318 Col: 10
- o x
2. Data Manipulation
3. Data Analysis
4. Statistical Analysis
5. EXIT
STATISTICAL ANALYSIS
To find variance
ENGLISH 5.833083
MATHEMATICS 8.520580
PHYSICS 11.281885
CHEMISTRY 9.578009
IP 8.317705
DAORWNE
2. Vata Manipulation
3. Data Analysis
4. Statistical Analysis
5. EXIT
Lr 35 Col: 19
OPTIONS — TO AND VARIANCE
File Edit
>>>
“credits”
Data Visualisatio
Data Manipulation
Statistical Analysis
1
2
3. Data Analysis
4a.
5
EXIT
Enter your choice: 4
Or
“license ()"
6. EXIT
Data Visualisatio
Data Manipulation
Statistical Analysis
1
2
3. Data Analysis
4
De
EXIT
Enter your choice: |
Help
Data Visualisation
Data Manipulation
Statistical Analysis
1
2
3. Data Analysis
4
5
EXIT
Enter your choice:
STATISTICAL ANALYSIS
38
49
il
30
40
51
56.
PHYSICS
-000000
-552632
-281885
-000000
- 250000
- 000000
000000
ENGLISH MATHEMATICS
count 38.000000 38 .000000
mean 60.394737 50.684211
std 5.838083 8.520580
min 50.000000 35.000000
25% 55.500000 44.250000
50% 61.000000 50.000000
19% 65.000000 57.000000
max 70.000000 65.000000
one option:
Data Visualisation
Data Manipulation
Statistical Analysis
1
2
3. Data Analysis
4
5
. EXIT
Enter your choice:
69
-000000
CHEMISTRY
38.000000
53.789474
9.578009
34.000000
45.250000
55.500000
61.750000
68.000000
38.
54.
-317705
35.
50.
54.
60.
68.
ao
IP
000000
289474
000000
250000
000000
500000
000000
a
x
In: 35 Cal 19
Ln: 61 Col: 19
OPTIONS — TO AND ALL THEINFORIVATION OF THE DATAFRAME
q. Statistical Analysis
5. EXIT
STATISTICAL ANALYSIS
<class 'pandas.core.frame.DataFrame'>
Index: 38 entries, 1 to 38
2. Data Manipulation
3. Data Analysis
4. Statistical Analysis
5. EXIT
Ln: 92 Col: 19
BIBLIOGRAPHY