Expt 2 A110MohdRayyan

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Experiment No.

02
PART A
(PART A: TO BE REFFERED BY STUDENTS)

A.1 Aim: Identify and implementation of basic data objects of data pre-processing and extraction

A.2 Prerequisite: Software Programming

A.3 Outcome:
After successful completion of this experiment students will be able to

1. Identify different data objects used in data preprocessing


2. To implement data objects
3. Learn to analyze structure of this data item.
4. Extract data from csv file and create data object.
5. Analyze the data with basic commands using Python
A.4 Theory:
A data object is a region of storage that contains a value or group of values. Each value can be
accessed using its identifier or a more complex expression that refers to the object. In addition,
each object has a unique data type. The data type of an object determines the storage allocation
for that object and the interpretation of the values during subsequent access. It is also used in
any type checking operations. Both the identifier and data type of an object are established in
the object declaration.

A data object is a region of storage that contains a value or group of values. Each value can be
accessed using its identifier or a more complex expression that refers to the object. In addition,
each object has a unique data type. The data type of an object determines the storage allocation
for that object and the interpretation of the values during subsequent access. It is also used in
any type checking operations. Both the identifier and data type of an object are established in
the object declaration.
A.5 Task to be completed in PART B

A.5.1. Task 1:
Every student needs to follow following steps and record the findings in appropriate
section of PART B

1. Create two vector objects to store stock price of Microsoft as MSFT and Facebook as
FB.
2. Create vector object “Stock” by concatenation of Microsoft and Facebook stock and
print the vector object Stock.
3. Use Matrix object to display the stock price of both the object as below

4. Create Matrix object to store data as shown below

5. Create data frame object to store details of Employee (10 records) has below and perform
following operation.
Empid, Empname, age, salary.
a. display data frame.
b. Get Mean salary
C. Get Standard deviation of salary
d. show number of levels for gender

*****************
PART B
(PART B: TO BE COMPLETED BY STUDENTS)

B.1 Tasks given in PART A to be completed here


Program- Q1,2,3:

Output- Q1,2,3:
Program- Q4:

Program- Q5:
Output- Q5:
B.2 Observations and Learning:
Data Frames is a way to store the data in easy way of multiple lists and many operations can
be performed in a single line code. Data frames are a powerful tool for organizing,
manipulating, and analyzing tabular data in Python using panda’s library.

B.3 Conclusion:
The program offers flexibility for data operations like sorting, filtering, aggregating, and
visualizing employee information, using a data frame structure for efficient and accessible
human resource management.

B.4 Question of curiosity:


1. What is difference between vector and list
Ans. Vector List
Stores elements of the same type or Holds different data such as numeric,
converts implicitly. character, etc.
Non-recursive Recursive
One-Dimensional Object Multidimensional Object

2. Do multidimensional array and data frame represent same structure of data storage?

Ans. No, a multidimensional array and data frame does not represent same structure of
data storage as multidimensional array can have multiple dimension with elements of
typically same data type whereas in data frame there is 2 dimensional labelled data
structure in which columns can have different data type the rows.

***************

You might also like