Comp project
Comp project
PROJECT
1
UNITED INTERNATIONAL INDIAN SCHOOL
AREA 3, STREET 170, JLEEB AL SHYOUKH, AL HASSAWI
In
INFORMATICS PRACTICES (065)
By:
Sreehari Rajesh – XII A – ROLL NO: 8
2
CERTIFICATE
Internal Examiner:
External Examiner:
Principal
3
DECLARATION
Sreehari Rajesh
4
ACKNOWLEDGEMENT
5
INDEX
SL NO NAME OF CONTENT
1 FEATURES OF PYTHON
5 AIM OF PROJECT
6 EXCEL FILE
7 CSV FILE
8 PYTHON PROGRAM
9 OUTPUTS
10 BIBLIOGRAPHY
6
FEATURES OF PYTHON
There are many features of Python language, some of which are discussed
below.
Easy to Learn and Maintain:
Python programming language has a few keywords. Its source code is relatively
easy to learn & maintain compared to other programming language like C,
JavaScript, Java, etc. Its syntax structure is simple and substantially precisely like
the English vocabulary. There’s no any usage of the semicolon or curly-bracket;
the indentation defines the code block.
Expressive language:
Python programming language can do complicated tasks with a few lines of
code. For example, the hello world program you type print (“Hello World”). It
takes just one line to do, while Java or C takes multiple lines. Python supports
both functional and structured programming methods in addition to object
oriented programming.
Open Source and Free:
Python is an open-source programming language which means that anyone can
create and contribute to its development. Python has an online forum where
thousands of coders gather daily to improve this language further. Along with this
python is free to download and use in any operating system, be it Windows, Mac
or Linux.
High-Level language:
Python has been designed to be a high-level programming language, which means
that when you code in python you don’t need to be aware of the coding structure,
architecture as well as memory management.
Python is portable language:
Python is a portable language. Python code can operate evenly on various
platforms like Windows, Linux, UNIX and Macintosh etc. Thus, we can say that
Python is a portable language. It enables programmers to create the software for
many competing platforms by writing a program just once.
Object-Oriented language:
Python supports object-oriented language, concepts of classes, objects
encapsulation, etc. It supports inheritance, polymorphism and encapsulation.
7
The object-oriented procedure can help the programmer to write reusable code
and create software in significantly less code.
Support for GUI:
GUI or Graphical User Interface is one of the key aspects of any programming
language because it has the ability to add flair to code and make the results more
visual. Python has support for a wide array of GUIs which can easily be imported
to the interpreter, thus making this one of the most favourite languages for
developers.
Highly Portable:
Suppose you are running Python on Windows and you need to shift the same to
either a Mac or a Linux system, then you can easily achieve the same in Python
without having to worry about changing the code. This is not possible in other
programming languages, thus making Python one of the most portable languages
available in the industry.
Highly Dynamic:
As mentioned in an earlier paragraph, Python is one of the most dynamic
languages available in the industry today. What this basically means is that the
type of a variable is decided at the run time and not in advance. Due to the
presence of this feature, we do not need to specify the type of the variable during
coding, thus saving time and increasing efficiency.
Extensive Array of Library:
Out of the box, Python comes inbuilt with a large number of libraries that can be
imported at any instance and be used in a specific program. The presence of
libraries also makes sure that you don’t need to write all the code yourself and
can import the same from those that already exist in the libraries.
Python is Scalable:
Scalable in the python means, it can operate on a wide variety of hardware
platforms and contains the same interface on all platforms.
8
FEATURES OF PYTHON PANDAS
Handling of Data:
The Pandas library provides a really fast and efficient way to manage and
explore data. It does that by providing us with Series and DataFrames, which
help us not only to represent data efficiently but also manipulate it in various
ways. These features of pandas is exactly what makes it such an attractive
library for data scientists.
Alignment and Indexing:
Having data is useless if you don’t know where it belongs and what it tells us
about. Therefore, labelling of data is of utmost importance. Another important
factor is an organization, without which data would be impossible to read. These
two needs: Organization and Labelling of data are perfectly taken care of by the
intelligent methods of alignment and indexing, which can be found within
Pandas.
Handling missing data:
As discussed above, data can be quite confusing to read. But that is not even one
of the major problems. Data is very crude in nature and one of the many
problems associated with data is the occurrence of missing data or value.
Therefore, it is pertinent to handle the missing values properly so that they do
not adulterate our study results. Some Pandas features have you covered on this
end because handling missing values is integrated within the library.
Cleaning up data:
Like we just said, data can be very crude. Therefore it is really messy, so much
so that performing any analysis over such data would lead to severely wrong
results. Thus it is of extreme importance that we clean our data up, and this
pandas feature is easily provided.
Input and Output tools:
Pandas provide a wide array of built-in tools for the purpose of reading and
writing data. While analysing you will obviously need to read and write data
into data structures, web service, databases, etc. This has been made
extremely simple with the help of Pandas inbuilt tools.
Multiple file formats supported:
Data these days can be found in so many different file formats, that it becomes
crucial that libraries used for data analysis can read various file formats. Pandas
aces this sector with a huge scope of file formats supported. Whether it is a JSON
or CSV, pandas can support it all, including Excel and HDF5. This can be
considered as one of the most appealing Python Pandas features.
9
Merging and Joining of Datasets:
While analysing data we constantly need to merge and join multiple datasets to
create a final dataset to be able to properly analyse it. This is important
because if the datasets aren’t merged or joined properly, then it is going to
affect the results adversely and we do not want that. Pandas can help to merge
various datasets, with extreme efficiency so that we don’t face any problems
while analysing the data.
Optimized performance:
Pandas is said to have a really optimized performance, which makes it really fast
and suitable for data science. The critical code for Pandas is written in C or
Python, which makes it extremely responsive and fast.
Python support:
This feature of pandas is the deal closer. With an insane amount of helpful
libraries at your, disposal Python has become one of the most sought after
programming languages for data analysis. Thus, Pandas being a part of python
and allowing us to access the other libraries like NumPy and Matplotlib.
Visualize:
Visualizing the data is an important part of data science. It is what make the
results of the study understandable by human eyes. Pandas have an inbuilt
ability to help you plot your data and see the various kinds of graphs formed.
Without visualization, data analysis would make no sense to most of the
population.
Grouping:
Having the ability to separate your data and grouping it according to the criteria
you want, is pretty essential. With the help of the features of Pandas like
GroupBy, you can split data into categories of your choice, according to the
criteria you set.
10
FEATURES OF MATPLOTLIB
Conventionally, the package is imported into the Python script by adding the
following statement
from matplotlib import pyplot as plt
11
FEATURES OF CSV
The following are the features of CSV:
CSV (Comma Separated Values) is a simple file format used to store tabular
data, such as spreadsheet or database. A CSV file stores tabular data in plain
text. Each line of the file is a data record. Each record consists of one or more
fields, separated by commas.
12
AIM OF PROJECT
1. Top Records
2. Bottom Records
3. Print Particular column
4. Print Multiple column
4. Visualisation
1. To display HISTOGRAM of all numeric columns
2. To display the LINE CHART for each GYM MEMBER against
FEES
13
EXCEL FILE
14
PROGRAM
import pandas as pd
while True:
if ch==1:
print(df)
elif ch==2:
15
mch=float(input("Enter your choice: "))
if mch==2.1:
a=df.index
count=0
for i in a:
print(i)
count+=1
16
g=input("Enter TRAINER: ")
df.loc[count]=[a,b,c,d,e,f,g,h]
print()
print(df)
elif mch==2.2:
df=df.drop([a],axis=0)
print(df)
elif ch==3:
17
Enter option 3.3 to Display a particular column \n Enter option 3.4 to
Display multiple columns")
if mch==3.1:
print(df.head(a))
elif mch==3.2:
print(df.tail(a))
elif mch==3.3:
print(df[a])
elif mch==3.4:
18
print("Name of columns",df.columns)
print(df[a])
elif ch==4:
if mch==4.1:
df.hist(['NAME','AGE'],color='red')
plt.show()
elif mch==4.2:
df.plot(x='NAME',y='AGE',kind='bar',color='red',edgecolor='black')
plt.legend(loc='upper left')
19
plt.show()
elif mch==4.3:
df.plot(x="NAME",y="AGE",kind='line',linestyle='dashdot',color='blue',ma
rker='d',markerfacecolor='black',markeredgecolor='red')
plt.legend(loc='upper left')
plt.show()
else:
break
20
MAIN MENU:
OUTPUT
21
READING CSV AND EXCEL FILE:
22
MANIPULATION-INSERTING ROWS:
M
ANIPULATION-DELETING ROWS:
23
ANALYSIS -TOP RECORD:
ANALYSIS-BOTTOM RECORD:
24
ANALYSIS-TO PRINT MULTIPLE COLUMNS:
VI
SUALISATION-HISTOGRAM:
VISUALISATION-LINE CHART:
25
VISUALISATION-BAR CHART:
26
BIBLIOGRAPHY
Referred from the following sites:
• https://thedarshika.com/ip-projects-class-12-pdf-free-download/
• https://pythonworld.in/practical-project/project-list/ •
http://python.mykvs.in/uploads/showpapers/testproject.php
•READER: INFORMATICS PRACTICES BY SUMITA ARORA
27