0% found this document useful (0 votes)
28 views6 pages

Lab 7

This lab report describes tasks completed for a data analytics lab using Python libraries Pandas and Numpy. The objective was to understand and use different use cases of the libraries for data analysis. Tasks included dropping and renaming columns in a weather dataset, grouping and aggregating data, reshaping arrays, generating random numbers, and concatenating/comparing array elements. Problems encountered included decreased dataset size after removing null values.

Uploaded by

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

Lab 7

This lab report describes tasks completed for a data analytics lab using Python libraries Pandas and Numpy. The objective was to understand and use different use cases of the libraries for data analysis. Tasks included dropping and renaming columns in a weather dataset, grouping and aggregating data, reshaping arrays, generating random numbers, and concatenating/comparing array elements. Problems encountered included decreased dataset size after removing null values.

Uploaded by

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

Lab report 7

Fall 2021
CSE422L Data Analytics Lab
Submitted by: Ayaz Mehmood
Registration No.:18PWCSE1652
Section: A

“On my honor, as student of University of Engineering and Technology, I have


neither given nor received unauthorized assistance on this academic work.”

Student Signature: ______________

Submitted to:
Engr. Mian Ibad Ali Shah
Last date of Submission:
11 February 2022

Department of Computer Systems Engineering


University of Engineering and Technology, Peshawar
OBJECTIVE:
The basic Objective of this lab is:
 To know the basic python library.
 To understand and use different use cases of the library.
 To use these library for the purpose of data analysis.

TASKS
Task 1:
PANDAS: In the 'WeatherAUS' dataset file, Perform using Pandas :

Part 1:
1.1) Drop the Sunshine column
1.2) Change the index of the data frame to (Date and Location) must be concatenated and then
set the index

1.3) Drop rows having NA. Any problems with this step? Explain.

The problem with this step is due to removal of null value cells the size of the dataset
decrease
1.4) Change column names to your choice!

1.5) Create a data frame having location and Average Minimum and Average Maximum
temperatures grouped by Location .
Numpy Task:
2) Create a simple 1D integer array (64 elements) in Numpy. Reshape the array to
(4,4,4). Also change the data type to float.

3) Perform linspace function as per your choice (other than practiced in lab)

4) Create a random numbered array (random numbers ranging from 1 to 100) using
Numpy.random() function.
5) In the 'WeatherAUS' dataset file, Perform using Numpy:

5.1) Concatenate WindSpeed9am and WindSpeed3pm in a variable called "Combined"

5.2)  Get positions  of elements where the values of both features are same in
"combined"

You might also like