Professional Documents
Culture Documents
5061 - Summer Internship Report
5061 - Summer Internship Report
ON
Bachelor Of Engineering
In
By
160319735061
DECLARATION
I hereby certify that the work which is being presented in the report entitled
“Python and Data Analytics” in fulfillment of requirement for completion of the
four weeks internship in Department of Electronics and Communication
Engineering of “Deccan College of Engineering and technology” is an authentic
record of my own work carried out during the internship.
1603-1973-5061
DCET, Hyderabad
2
CERTIFICATE
This is to certify that the project entitled “Python and Data Analytics” submitted by “Syed
Abrar Ur Rahman” (1603-1973-5061) of B.E III year, Department of Electronics and
Communication Engineering (ECE) from DECCAN COLLEGE OF ENGINEERING AND
TECHNOLOGY, Affiliated to OU, Hyderabad in partial fulfilment for the award of Bachelor
of engineering is a record of bonafide work carried out by him.
3
4
ACKNOWLEDGEMENT
It is with sense of gratitude; I acknowledge the efforts of entire hosts of well-wishers who
have in some way or other contributed in their own special ways to the success and
completion of the Summer Training. Successfully completion of any type of technology
requires helps from a number of people. I have also taken help from different people for the
preparation of the report. Now, there is little effort to show my deep gratitude to those helpful
people.
First, I express my sense of gratitude and indebtedness to our Training mentor- Ashish
Panday. From the bottom of my heart, for his immense support and guidance throughout the
training. Without his kind direction and proper guidance this study would have been a little
success. In every phase of the project his Supervision and guidance shaped this training to be
completed perfectly.
5
TABLE OF CONTENTS
6
1. INTRODUCTION TO PYTHON PROGRAMMING
Why Python???
4. Extensive Packages.
• UNDERSTANDING OPERATORS:
Variables are named bounded to objects. Data types in python are int (Integer), Float,
Boolean and strings.
• CONDITIONAL STATEMENTS:
• LOOPING CONSTRUCTS:
For loop
While loop
Do while loop
7
• FUNCTIONS:
Functions are re-usable piece of code. Created for solving specific problem.
• DATA STRUCTURES:
LISTS: A list is an ordered data structure with elements separated by comma and
enclosed within square brackets.
8
2. DATA TYPES IN PYTHON
Variables can hold values, and each value has a data-type.
Python is a dynamically typed language. Hence we do not need to define the type of the
variable while declaring it.
Python provides type() function to find the data type of the variable.
9
2.2. Dictionary Data Type
• Dictionaries are kind of table type.
• Dictionaries are enclosed by curly braces {} and values can be assigned and accessed
using square braces []
• Syntax: dict_name = {key0: value0, key1: value1}
• Example
Dict = {‘Name’ : ‘Syed’, ‘Class’ : ‘ECE’, ‘Roll no’ : 5061}
10
2.5. Tuple Data Type
• A Tuple in python is an ordered sequence of elements of different data types such as
integer, float, string, list or even other tuple.
• Tuples are enclosed by round brackets ()
• Tuples should have a minimum of 2 elements stored.
• Syntax: t = (element0, element1, element2)
• Example
T=(1, 2, ’python’, (12, 86) ) //tuple with 2 integer values, a string and another tuple.
11
3. CONDITIONAL AND ITERATIVE STATEMENTS IN PYTHON
3.1.Conditional statements
• Conditional statements are used when we need to check a certain condition and
run the block of code. If the condition is True then the block of code will be
executed otherwise the block will not be executed.
• Different types of conditional statements are
➢ If
➢ If else
➢ Elif
➢ Nested if else
3.1.1. if
• In if statement the condition is defined initially before executing the portion of the
code.
• Syntax:
if(condition):
statement
• Example
if(a>b):
print(“a is greater than b”)
3.1.2. if else
• if else statement is used for decision making.
• A block of code is executed if the condition is True otherwise other block of code
is executed.
• Syntax:
if(condition):
True_statement
else:
False_statement
12
3.1.3. Nested if else
• We can have an if else statement inside another if else statement.
• This is called nesting in computer programming.
• Example
if(condition1):
if(condition2):
Statement
else:
statement
13
3.2.2. for statement
• The for statement is used to iterate through a sequence like a list, a tuple, a
set, a dictionary, or a string.
• Syntax Example
for <variable> in <sequence>: for i in range(0,5):
statement1 print(i)
statement2
….
14
4. PYTHON LIBRARIES USED IN DATA ANALYTICS
4.2.2. Pandas
• Pandas is a fast, powerful, flexible and easy to use open source
data analysis and manipulation tool.
• Pandas is best for handling data. It can handle missing data,
cleaning up the data and it supports multiple file formats.
• It can read or load data in many formats like CSV, Excel, SQL etc.
4.2.3. Matplotlib
• It is used for visualization with python.
• It is graph plotting library in python that serves as a
visualization utility.
• Different graphs like line, column, pie, scatter plots can be easily drawn
using matplotlib.
15
5. EXPLORATORY DATA ANALYSIS
• Another useful method is value_counts() which can get the count of each
category in a categorical attributed series of values.
• Syntax
DF[“Variable”].value_counts()
16
5.3. Correlation
• Correlation is a simple relationship between two variables in a context such
that one variable affects the other.
• corr() function can be used to find the correlation between the variables.
• Syntax
DF.corr()
17
6. EDA ON TITANIC DATASET
18
• Heat map of missing values. (Yellow = missing value)
• Description of Data
19
• Survival with respect to Passenger class (Pclass)
20
• Data Cleaning.
21
• Pie Chart on Male vs Female population on titanic.
• Correlation
22
• Class distribution of titanic using pie chart.
23
• Fare given with respect to Age.
24
7. CONCLUSION
Data analytics has a lot of benefits and can make the data a lot more efficient.
Data analytics will be very important in the near future where the need of manual
computations and analysis of the data seems to be coming to an end.
25