0% found this document useful (0 votes)
7 views17 pages

Batch 1 - Set 1 - Front Page Questions

The document outlines the practical examination syllabus for the B.E/B.Tech. CS3361 Data Science Laboratory for November/December 2024. It includes various programming tasks using NumPy and Pandas, such as creating arrays, performing data analysis, and generating plots. Each task is assigned a specific weight for evaluation, including program, result, viva-voce, and record components.

Uploaded by

ezhilarasi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views17 pages

Batch 1 - Set 1 - Front Page Questions

The document outlines the practical examination syllabus for the B.E/B.Tech. CS3361 Data Science Laboratory for November/December 2024. It includes various programming tasks using NumPy and Pandas, such as creating arrays, performing data analysis, and generating plots. Each task is assigned a specific weight for evaluation, including program, result, viva-voce, and record components.

Uploaded by

ezhilarasi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

B.E/B.Tech.

PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

a. Write a NumPy program to create a null vector of size 10 and update sixth value to 11
b. Write a NumPy program to convert an array to a float type
1 c. Write a NumPy program to create a 3x3 matrix with values ranging from 2 to 10
d. Write a NumPy program to convert a list of numeric value into a one-dimensional
NumPy array
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

a. Write a NumPy program to convert an array to a float type


b. Write a NumPy program to create an empty and a full array
2 c. Write a NumPy program to convert a list and tuple into arrays
d. Write a NumPy program to find the real and imaginary parts of an array of complex
numbers
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Write a Pandas program to get the powers of an array values element-wise.


Note: First array elements raised to powers from second array
Sample data: {'X':[78,85,96,80,86], 'Y':[84,94,89,83,86],'Z':[86,97,96,72,83]}
Expected Output:
XYZ
3
0 78 84 86
1 85 94 97
2 96 89 96
3 80 83 72
4 86 86 83

Aim and Program Result Viva-Voce Record Total


Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Write a Pandas program to select the specified columns and rows from a given data
frame. Sample Python dictionary data and list labels:
Select 'name' and 'score' columns in rows 1, 3, 5, 6 from the following data frame.
exam_data = {'name': ['Anastasia', 'Dima', 'Katherine', 'James', 'Emily', 'Michael',
'Matthew', 'Laura', 'Kevin', 'Jonas'],
'score': [12.5, 9, 16.5, np.nan, 9, 20, 14.5, np.nan, 8, 19],
'attempts': [1, 3, 2, 3, 2, 3, 1, 1, 2, 1],
'qualify': ['yes', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'no', 'no', 'yes']}
4
labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
Expected Output:
Select specific columns and rows:
score qualify
b 9.0 no
d NaN no
f 20.0 yes
g 14.5 yes

Aim and Program Result Viva-Voce Record Total


Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Write a Pandas program to count the number of rows and columns of a DataFrame.
Sample Python dictionary data and list labels:
exam_data = {'name': ['Anastasia', 'Dima', 'Katherine', 'James', 'Emily', 'Michael',
'Matthew', 'Laura', 'Kevin', 'Jonas'],
'score': [12.5, 9, 16.5, np.nan, 9, 20, 14.5, np.nan, 8, 19],
5 'attempts': [1, 3, 2, 3, 2, 3, 1, 1, 2, 1],
'qualify': ['yes', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'no', 'no', 'yes']}
labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
Expected Output:
Number of Rows: 10
Number of Columns: 4

Aim and Program Result Viva-Voce Record Total


Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

Reading data from text files, Excel and the web and exploring various commands for
6
doing descriptive analytics on the Iris data set

Aim and Program Result Viva-Voce Record Total


Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Use the diabetes data set from Pima Indians Diabetes data set for performing the
following:
Apply Univariate analysis:
 Frequency
 Mean,
7
 Median,
 Mode,
 Variance
 Standard Deviation
 Skewness and Kurtosis
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

Use the diabetes data set from Pima Indians Diabetes data set for performing the
following:
8
Apply Bivariate analysis:
 Linear and logistic regression modeling
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Use the diabetes data set from Pima Indians Diabetes data set for performing the
following:
9
Apply Bivariate analysis:
 Multiple Regression analysis
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

Apply and explore various plotting functions on UCI data set for performing the following:
10 a) Normal values
b) Density and contour plots
c) Three-dimensional plotting
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Apply and explore various plotting functions on UCI data set for performing the following:
11 a) Correlation and scatter plots
b) Histograms
c) Three-dimensional plotting
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

Apply and explore various plotting functions on Pima Indians Diabetes data set for
performing the following:
12 a) Normal values
b) Density and contour plots
c) Three-dimensional plotting
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Apply and explore various plotting functions on Pima Indians Diabetes data set for
performing the following:
13 a) Correlation and scatter plots
b) Histograms
c) Three-dimensional plotting
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

Write a Pandas program to count number of columns of a DataFrame.


Sample Output:
Original DataFrame
col1 col2 col3
0147
14 1258
2 3 6 12
3491
4 7 5 11
Number of columns:
3
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Write a Pandas program to group by the first column and get second column as lists in
rows

Sample data:
Original DataFrame
col1 col2
0 C1 1
1 C1 2
2 C2 3
15 3 C2 3
4 C2 4
5 C3 6
6 C2 5
Group on the col1:
col1
C1 [1, 2]
C2 [3, 3, 4, 5]
C3 [6]
Name: col2, dtype: object

Aim and Program Result Viva-Voce Record Total


Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Write a Pandas program to check whether a given column is present in a DataFrame or


not. Sample data:
Original DataFrame
col1 col2 col3
0147
1258
16 2 3 6 12
3491
4 7 5 11
Col4 is not present in DataFrame.
Col1 is present in DataFrame.

Aim and Program Result Viva-Voce Record Total


Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Create two arrays of six elements. Write a NumPy program to count the number of
instances of a value occurring in one array on the condition of another array.
Sample Output:
Original arrays:
17
[ 10 -10 10 -10 -10 10]
[0.85 0.45 0.9 0.8 0.12 0.6 ]
Number of instances of a value occurring in one array on the condition of another array:
3
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

Create a 2-dimensional array of size 2 x 3, composed of 4-byte integer elements. Write a


NumPy program to find the number of occurrences of a sequence in the said array.
Sample Output:
Original NumPy array:
18 [[1 2 3]
[2 1 2]]
Type: <class 'numpy.ndarray'>
Sequence: 2,3
Number of occurrences of the said sequence: 2

Aim and Program Result Viva-Voce Record Total


Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

19 Write a NumPy program to merge three given NumPy arrays of same shape

Aim and Program Result Viva-Voce Record Total


Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

Write a NumPy program to combine last element with first element of two given ndarray
with different shapes.

Sample Output:
20 Original arrays:
['PHP', 'JS', 'C++']
['Python', 'C#', 'NumPy']
After Combining:
['PHP' 'JS' 'C++Python' 'C#' 'NumPy']
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Write a Pandas program to count the number of rows and columns of a DataFrame.
Sample Python dictionary data and list labels:
exam_data = {'name': ['Anastasia', 'Dima', 'Katherine', 'James', 'Emily', 'Michael',
'Matthew', 'Laura', 'Kevin', 'Jonas'],
'score': [12.5, 9, 16.5, np.nan, 9, 20, 14.5, np.nan, 8, 19],
5 'attempts': [1, 3, 2, 3, 2, 3, 1, 1, 2, 1],
'qualify': ['yes', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'no', 'no', 'yes']}
labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
Expected Output:
Number of Rows: 10
Number of Columns: 4

Aim and Program Result Viva-Voce Record Total


Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Write a Pandas program to count number of columns of a DataFrame.


Sample Output:
Original DataFrame
col1 col2 col3
0147
14 1258
2 3 6 12
3491
4 7 5 11
Number of columns:
3
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Write a NumPy program to combine last element with first element of two given ndarray
with different shapes.

Sample Output:
20 Original arrays:
['PHP', 'JS', 'C++']
['Python', 'C#', 'NumPy']
After Combining:
['PHP' 'JS' 'C++Python' 'C#' 'NumPy']
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

Reading data from text files, Excel and the web and exploring various commands for
6
doing descriptive analytics on the Iris data set

Aim and Program Result Viva-Voce Record Total


Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER


B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024
CS3361 – DATA SCIENCE LABORATORY

Apply and explore various plotting functions on UCI data set for performing the following:
11 a) Correlation and scatter plots
b) Histograms
c) Three-dimensional plotting
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

B.E/B.Tech. PRACTICAL END SEMESTER EXAMINATIONS – NOV/DEC 2024


CS3361 – DATA SCIENCE LABORATORY

Write a Pandas program to count number of columns of a DataFrame.


Sample Output:
Original DataFrame
col1 col2 col3
0147
14 1258
2 3 6 12
3491
4 7 5 11
Number of columns:
3
Aim and Program Result Viva-Voce Record Total
Algorithm (30) (30) (10) (10) (100)
(20)

INTERNAL EXAMINER EXTERNAL EXAMINER

You might also like