Program 1
Create a Numpy array then split it into two equal parts. Display both parts.
Input-
Output-
Program 2
Write a NumPy program to check that none of the elements of a given
array are zero.
Input-
Output-
Program 3
Write Python code to create a Pandas DataFrame using any sequence data
type.
a. Display the DataFrame.
b. Display first 5 records.
c. Display last 10 records.
d. Display the number of missing values in the dataset.
Input-
Output-
Program 4
Write a python program to create both 1D and 2D arrays using Numpy.
1D Array
Input-
Output-
2D Array
Input-
Output-
Program 5
A dataset of employee salaries contains missing values for some
departments. Write a Python code to handle these missing values by
replacing them with the mean of the respective columns.
Input-
Output-
Program 6
Create a Dataframe for records of 10 students. Display first 3 and last 3
rows from this Dataframe. Student record should contain rollno, name,
class and marks of a student.
Input-
Output-
Program 7
Create a series using Numpy array, store sales of a product from January
to June. Mention index as month name.
Input-
Output-
Program 8
Write a program to read data from CSV file using Pandas.
Input-
Output-
Program 9
Write a program to write 10 records of employees in a CSV file.
Input-
Output-
Program 10
Write a program to create a series with 15 integers. Display first 5 and last
5 elements.
Input-
Output-
Program 11
Perform Classification on the Penguin Dataset using the Orange tool. You
can download the dataset from the following link:
https://www.kaggle.com/code/parulpandey/penguin-dataset-the-new-iris/
input
Steps
1) Download the Dataset from the given link.
2) Open Orange tool and create a new project.
3) Import the downloaded dataset by using the File widget.
4) Handle missing values by using the Impute widget.
5) Select the target (class) variable for classification. In our case, it is
species column.
6) Use an classification algorithm from the following:
Logistic Regression
Random Forest
K-Nearest Neighbours
Naive Bayes
7) Evaluate the model using the Test & Score widget. Use Cross
Validation (default 10-fold) to evaluate accuracy.
8) Visualise the Results by using the Confusion Matrix widget.
Input-
Output-
Program 12
Perform text preprocessing on the preloaded BBC dataset in Orange tool.
The BBC Dataset contains news articles, containing categories business,
entertainment, and sport from 2004-2005.
Steps-
1) Open Orange Tool and add the Text add-on in it.
2) Upload the BBC dataset by using the Datasets widget.
3) Add the Corpus widget in the workflow.
4) Add the Preprocess Text widget to clean the raw text.
5) Add Word Cloud widget to explore the processed text.
Input-
Output-
Program 13
Perform Linear Regression on the preloaded ‘Boston Housing Dataset’, in
Orange Tool. Also evaluate the model.
Steps-
1) Open Orange tool and create a new project.
2) Import the Boston Housing Dataset by using the File widget.
3) Use the Linear Regression algorithm.
4) Use the Data Table widget that connect with the Linear Regression
widget to shows the coefficient data.
5) Evaluate the model using the Test & Score widget. Use Cross
Validation to evaluate accuracy.
6) Use the Data Table widget that connect with the Test and Score
widget to show the predicted data.
Input-
Output-