Informatics Practices Project (1) Manan
Informatics Practices Project (1) Manan
Ms.Neha Choudhary
Informatics Practices
Date:
ACKNOWLEDGEMENT
I would like to express my special thanks of gratitude to
my teacher Ms.Neha Choudhary who gave me the golden
opportunity to do this project. This also helped me to
know so many new things while doing the project I am
really thankful to you who gave me valuable suggestions
on this project made by which gave me inspiration to
improve my work.
INDEX
SNO DESCRIPTION PAGE.NO.
1 Introduction 1
2 Csv File data Format 2
3 Coding 2-8
4 Output screen 9-16
5 Bibliography 17
INTRODUCTION
Technlogy used:
Python 3.7.0
*Pandas
*Matplotlib
Pandas: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.
To import this library: import pandas as pd
MATPLOTLIB: Matplotlib is a plotting library for the
Python programming language its numerical
mathematics extension NumPy
To import this library: import matplotlib.pyplot as plt
Csv data
File name: stud.csv
File location : C:\Users\User\Downloads\
XIIInfo.Pract.176\stud.csv
Source code
import pandas as pd
def main_menu():
def create_dataframe_menu():
def analysis_menu():
def visualisation_menu():
cols = ['admn','name','dob','class','maths','english','science','marks']
df = pd.DataFrame([],columns = cols) # Create an EmptyDataFrame
while True:
main_menu()
if ch == 1:
create_dataframe_menu()
if ch == 1:
data = []
while True:
if ch.lower() == 'y':
marks = maths+english+science
else:
break
elif ch == 2:
elif ch == 3:
df.index = index_list
elif ch == 4:
df.columns = column_list
print(df)
elif ch == 2:
while True:
analysis_menu()
if ch == 1:
print(df)
elif ch == 2:
print(df.head(nth))
elif ch == 3:
print(df.tail(nth))
elif ch == 4:
print(df.sort_values(by='name'))
elif ch == 5:
print(df[df['marks'] == df['marks'].max()])
elif ch == 6:
print(df[df.marks == df["marks"].min()])
elif ch == 7:
elif ch == 8:
print(df['class'].unique())
elif ch == 9:
while True:
if ch.lower() == 'y':
marks = maths+english+science
else:
break
elif ch == 10:
df = df.drop(index = idx)
elif ch == 2:
df = df.drop(df[df["admn"] == admn].index)
else:
else:
break
elif ch == 3:
while True:
visualisation_menu()
if ch == 1:
plt.xlabel("Student", fontsize=12)
plt.ylabel("Marks", fontsize=12)
plt.legend()
plt.show()
elif ch == 2:
x_values = df["name"]
y_values = df['marks']
plt.xlabel("Students", fontsize=12)
plt.ylabel("Marks", fontsize=12)
plt.show()
elif ch == 3:
x_values = df["name"]
y_values = df["class"]
plt.xlabel("Students", fontsize=12)
plt.ylabel("Class", fontsize=12)
plt.show()
elif ch == 4:
break
else:
elif ch == 4:
elif ch == 5:
# Exit
print("Bye ...")
exit()
else:
break
output screen
BIBLIOGRAPHY
1.Informatics Practices By-Sumit Arora
3.Class Notes