DataFrame Quiz 4

Share with others

Welcome to your DataFrame Quiz 4

School Name
Q31. The following statement will _____________________

df = df.drop(['Name', 'Class', 'Rollno'], axis = 1) #df is a DataFrame object

Q32. If the DataFrame has more than one row with the same label, then DataFrame.drop( ) method will delete _________________

Q33. Write the code to remove duplicate row labelled as 'R1' from DataFrame 'DF1'

Q34. Which method is used to change the labels of rows and columns in DataFrame?

Q35. The parameter axis='index' of rename( ) function is used to specify that the ____________________

Q36. What will happen if in the rename( ) function we pass only a value for a row label that does not exist?

Q37. What value should be given to axis parameter of rename function to alter column name?

Q38. The following statement is ______________________

>>> DF=DF.rename({'Maths':'Sub1',‘Science':'Sub2'}, axis='index') #DF is a DataFrame

Q39. Write a statement to delete column labelled as 'R1' of DataFrame 'DF'.

Q40. Which of the following parameter is used to specify row or column in rename function of DataFrame?

Share with others

Leave a Reply

error: Content is protected !!