A 10 B 20 C 30 D 40 E 50 dtype: int64
import numpy as np import pandas as pd data = np.array([10, 20, 30, 40, 50]) index_labels = ['A', 'B', 'C', 'D', 'E'] series = pd.Series(data, index=index_labels) print(series)
Consider the DataFrame Doctor shown below:
Write suitable Python statements for the following:
(i) To print the last three rows of the DataFrame Doctor.
(ii) To display the names of all doctors.
(iii) To add a new column 'Discount' with value of 200 for all doctors.
(iv) To display rows with index 2 and 3.
(v) To delete the column 'Department'.
Gurkirat has to fill in the blanks in the given Python program that generates a line plot as shown below. The given line plot represents the temperature (in degree Celsius) over five days as given in the table:
Write the missing statements according to the given specifications:
(i) Write the suitable code to import the required module in the blank space in the line marked as Statement-1.
(ii) Fill in the blank in Statement-2 with a suitable Python function name to create a line plot.
(iii) Refer to the graph shown and fill in the blank in Statement-3 to display the appropriate label for x-axis.
(iv) Refer to the graph shown and fill in the blank in Statement-4 to display the suitable chart title.
City State 0 Mumbai Maharashtra 1 Dehradun Uttarakhand 2 Bengaluru Karnataka 3 Hyderabad Telangana
import pandas data = [50, 15, 40] series = pd.series(data, Index=['x', 'y', 'z']) Print(series)
COLOUR NAME QTY 0 Red Apple 10 1 Blue Berry 15 2 Green Guava 20
import _______ as pd
data = [
{'COLOUR': 'Red', 'NAME': 'Apple', 'QTY': 10},
{'COLOUR': 'Blue', 'NAME': 'Berry', 'QTY': 15},
{_______, 'NAME': 'Guava', 'QTY': 20}
]
df = pd.DataFrame(_______)
print(_______)
A racing track is built around an elliptical ground whose equation is given by \[ 9x^2 + 16y^2 = 144 \] The width of the track is \(3\) m as shown. Based on the given information answer the following: 
(i) Express \(y\) as a function of \(x\) from the given equation of ellipse.
(ii) Integrate the function obtained in (i) with respect to \(x\).
(iii)(a) Find the area of the region enclosed within the elliptical ground excluding the track using integration.
OR
(iii)(b) Write the coordinates of the points \(P\) and \(Q\) where the outer edge of the track cuts \(x\)-axis and \(y\)-axis in first quadrant and find the area of triangle formed by points \(P,O,Q\).