Let data be a dataset having 4 columns. For example data =
87, 29, 10, 88 93, 95, 40, 67 55, 98, 27, 96 15, 34, 78, 23 12, 58, 11, 20 68, 65, 93, 11 …
Answer the following questions using Python commands. Your answers must work on any dataset that has 4 columns and not only on the one provided above.
(a) Select all of row 0: [87, 29, 10, 88].
I am giving you the answer to the first question:
data[0, :]
(b) Select all of column 3: [88, 67, 96, 23, 20, 11].
(c) Select all of rows 2, 3, and 4: 55, 98, 27, 96 15, 34, 78, 23 12, 58, 11, 20.
(d) Find the maximum value in column 3. For the given example, the value is 96.
(e) Find the row index of the maximum value in column 3. For the given example the output is 2.
(f) Select the entire row that contains the maximum value for column 3. For the given example, the row is [55, 98, 27, 96].
(g) Store the values of column 1 in a variable named col1.
(h) Using the variable col1, select all the values in column 1 that are greater than 50: [95, 98, 58, 65].
(i) Using the variable col1, select all the values in column 1 that are greater than 50 and smaller than 90: [58, 65].
(j) Display the entire data set sorted on column 1. For the given example, the output is
87, 29, 10, 88 15, 34, 78, 23 12, 58, 11, 20 68, 65, 93, 11 93, 95, 40, 67 55, 98, 27, 96