You are on page 1of 1

ELURU COLLEGE OF ENGINEERING AND TECHNOLOGY

CLASS : IInd B.Tech CSE-AI&DS


SUB : INTRODUCTION TO ARTIFICIAL INTELLIGENCE AND DATA SCIENCE LAB MANUAL
DATA SCIENCE LAB QUESTIONS
Topics covered : numpy, pandas and matplotlib
1. A. Create a n-dimensional array of your choice and add the array of ones and zeros to it .
B. Create a 3x3 matrix having random numbers as elements and perform the following elementary
operations such as finding determinant, inverse and matrix multiplication by itself.
2. A. Create an evenly spaced numpy array and explain about the working of linspace() function in
numpy with suitable examples.
B. Create your own programs using python for the following predefined functions in numpy
i. linspace()
ii. arange()
3. A. Contrast between dimension, shape and size of an array using suitable examples.
B. Write a python program using numpy for flattening, reshaping of numpy array for techniques
used in real-time like transpose etc.
4. Using numpy arrays find the solution to a system of linear equations having two variables (apply
suitable operations like transpose, determinant and adjoint etc. wherever required)
5. A. Slice multi-dimensional numpy arrays and perform nested slicing .
B. Contrast between numpy arrays and python list using a program.
6. A. Write a program using pandas Series data structure as a numpy ndarray with axis labelling.
B. Using pandas Data Frame data structure create a data frame and use the concat() function to add
another data frame to the existing one.
7. A. Write a program to illustrate the usage of dynamic column selection and how the user can set
up conditions upon the data present in a column.
B. Consider the following data.

i. Add a new column ‘quantity’, values of your choice and concatenate the second data frame
with the previous and observe the changes.
ii. Using matplotlib draw a plot having two curves where the products having price above than
average and vice versa.
8. A. Using exception handling try to read multiple file formats using pandas and print ‘FILE NOT
FOUND’ if the file is not available in the specific path.
B. With some files read in the above example plot the following using matplotlib - i. Bar chart ii. Pie
chart iii. Histogram iv. Scatter plot.
9. Import any dataset available in pandas by default and perform exploratory data analysis.

You might also like