


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



























Unit No Unit Name Marks
1 Data Handling using Pandas and Data Visualization
30
2 Database Query using SQL^25
3 Introduction to Computer Networks^7
4 Societal Impacts^8
Practical (^30)
Total (^100)
By,
Pandas is the most popular open source python library used for data analysis
It is a most famous Python package for data science, which offers powerful and flexible data structures that make data analysis and manipulation easy. Pandas makes data importing and data analyzing much easier. Pandas builds on packages like NumPy and matplotlib to give us a single & convenient place for data analysis and visualization work.
Installation of pandas:
Pandas installation can be done in Standard Python distribution, using following steps. 1.There must be service pack installed on our computer if we are using windows. If it is not installed then we will not be able to install pandas in existing Standard Python(which is already installed). So install it first(google it).
Q. Write command to install pandas in standard python distribution. pip install pandas
Series is a one-dimensional array like structure with homogeneous data, which can be used to handle and manipulate data.
Q. Why Series, Why not Array?
What makes it special is its index attribute, which has incredible functionality and is heavily mutable.
It has two parts-
**1. Data part (An array of actual data)
Index Data 0 10 1 15 2 18 3 22
Key Points :
● Homogeneous data ● Size Immutable ● Values of Data Mutable
Program using range() Output
Program using list (^) Output
Program using Tuple Output
Program using characters and string Output
Series.index = [ ‘first’, ‘second’, ‘third’, ‘fourth’, ‘fifth’]
2. Specify data as NumPy Array :
Using arange() function of NumPy
import pandas as pd
import numpy as np
print(pd.Series(np.arange(5,10,.5)))
4. Series Creation using Scalar value :
1. Specify data with NaN value : if the data element is not available you can specify NaN in place of data element. 2. Specify index and data parameter in Series( ) : import pandas as pd sr = pd. Series(data = *10,20,30,40+, index = *‘A’, ‘B’,’C’,’D’+) print(sr)
What is the Data type of NaN?
If we need to check the information of Any Series( ) Object then we need to use its Attributes. The Series attribute is defined as any information related to the Series object such as size, data type. etc. Below are some of the attributes that you can use to get the information about the Series object:
Attribute Description Series.index Returns index of the series Series.values Returns ndarray Series.dtype Returns dtype object of the underlying data Series.shape Returns tuple of the shape of underlying data Series.nbytes Returns number of bytes of underlying data Series.ndim Returns the number of dimension Series.size Returns the number of elements Series.itemsize Returns the size of the dtype Series.hasnans Returns true if there are any NaN Series.empty Returns true if series object is empty