Problem
Suppose you have a csv file, named data.csv, with the following content:
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
Write python code using pandas to do the following:
i. Read the content of the file and store it in a dataframe named data.
ii. Print out the first three rows.
iii. Print out the number of rows and columns.
iv. Compute the minimum value of the 2nd column.
v. What would this code produce: print(data.iloc[[2, 1], [1, 3]])
vi. Extract the first three rows and write them to a file named data1.csv.
vii. Change the even numbers in column 2 to 0 and the odd numbers in column 2 to 1.
viii. Scale the numbers in column 3 so that they are all from 0 to 1.
ix. Add a column at the end - each entry should have the value 1.
x. Add a row at the end - each entry should have the value 2.
xi. Delete the 3rd column.