(9a) PANDAS

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

DSC551

PANDAS

• Data frame – rows and columns which contain heterogenous tabular data
columns

RegNo Name Marks


1000 Steve 86
rows 1001 Mathew 90
1002 Jose 72
1004 Win 88

data

• Make sure to import the library/module to use pandas functions

• If there is a missing value in our dataset, python will replace with NaN

• Reading from csv file (excel delimited file), for example, file named employees.csv
DSC551

• To print item by rows using iterrows() function.

Other examples:

• To print index 2 data set


DSC551

• To print the first 5 rows in the dataset using head() function.

• To print the last 5 rows in the dataset using tail() function

• To remove rows which contain missing values (NaN) using dropna() function.

You might also like