0% found this document useful (0 votes)
2 views12 pages

Python Programming Lab

The document outlines various exercises in Python programming focused on creating and manipulating Pandas DataFrames using Numpy arrays and series. Each exercise includes tasks such as displaying data, adding rows/columns, handling missing values, and performing statistical functions. Additionally, there is a task for visualizing rainfall data using pie charts and bar graphs from a CSV dataset.

Uploaded by

keerthanastudy1
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)
2 views12 pages

Python Programming Lab

The document outlines various exercises in Python programming focused on creating and manipulating Pandas DataFrames using Numpy arrays and series. Each exercise includes tasks such as displaying data, adding rows/columns, handling missing values, and performing statistical functions. Additionally, there is a task for visualizing rainfall data using pie charts and bar graphs from a CSV dataset.

Uploaded by

keerthanastudy1
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/ 12

PYTHON PROGRAMMING

Ex No: 1
TASK:
Write Python code to create a Pandas DataFrame using Numpy array.

a) Display the DataFrame.

b) Display first 3 records.

c) Display last 2 records.

d) Display the number of missing values in the dataset

CODE:
OUTPUT:
PYTHON PROGRAMMING

Ex No: 2
TASK:
Write Python code to create a Pandas DataFrame using series.

a) Display the DataFrame.

b) Add a new row to the DataFrame

c) Display the index of the DataFrame

d) Display the shape of the DataFrame

CODE:
OUTPUT:
PYTHON PROGRAMMING

Ex No: 3
TASK:
Write Python code to create a Pandas DataFrame using series.

a) Display the DataFrame.

b) Add a new column to the DataFrame

c) Display the columns of the DataFrame

d) Delete a row of the DataFrame

CODE:
OUTPUT:
PYTHON PROGRAMMING

Ex No: 4
TASK:
Create a dataset in the form of CSV and perform the following:

a) Read CSV File and convert it into Pandas DataFrame.

b) Perform statistical functions on the dataset to check the data, checking missing values, filling
missing data etc.

CODE:
OUTPUT:

PYTHON PROGRAMMING

Ex No: 5
TASK:
Create a dataset in the form of CSV and perform the following:
a) Read CSV File and convert it into Pandas DataFrame.

b) Perform statistical functions on the dataset to check the data, checking missing values, delete the
rows with missing values

CODE:

OUTPUT:
PYTHON PROGRAMMING

Ex No: 6
TASK:
Write a program to draw a pie chart and bar graph to visualize the comparative rainfall data for 12
months in Tamil Nadu by using CSV dataset.
CODE:

OUTPUT:

You might also like