Class 12 Ippart 2
Class 12 Ippart 2
14. we can add new row to a data frame ResultDF using the method
a. ResultDF .add()
b. ResultDF. sum()
c. ResultDF.loc()
d. None of the above
15. we can delete rows and columns from data frame ResultDF using the method
a. ResultDF.remove()
b. ResultDF. delete()
c. ResultDF.drop()
d. None of the above
16. We can change the name of labels of dataframe ResultDF using the method
a. ResultDF.change()
b. ResultDF.alter()
c. ResultDF.rename()
d. None of the above
24. When using a dictionary to create a DataFrame, keys of the Dictionary becomes
a. Row labels
b. Column labels
c. Both row and column labels
d. None of the above
25. DataFrame.T gives the _____of a DataFrame
a. Size
b. Shape
c. Transpose
d. None of the above
a. Dictionary of tuples
b. Series
c. Dictionary of List
d. List of Dictionaries
26. Assuming the given series, named stud, which command will be used to print 5 as
output?
Amit 90
Ramesh 100
Mahesh 50
john 67
Abdul 89
Name: Student, dtype: int64
a. stud.index
b. stud.length
c. stud.values
d. stud.size
27. Which graph should be used where each column represents a range of values, and the height of a
column corresponds to how many values are in that range?
a. plot
b. line
c. bar
d. histogram
37. What is a correct syntax to return the values of first row of a Pandas DataFrame?
Assuming the name of the DataFrame is dfRent.
a. dfRent[0]
b. dfRent.loc[1]
c. dfRent.loc[0]
d. dfRent.iloc[1]