CBSE Class 12 Informatics Practices
Question 68 of 167
Python Pandas — I — Question 33
Back to all questionsDF.iloc[6:10, 3:6]
Reason — To display subset from dataframe using row and column numeric index/position, iloc is used with syntax <DF object>.iloc[<start row index>:<end row index>, <start col index>:<end col index>]. Therefore, according to this syntax, DF.iloc[6:10, 3:6] is correct slice notation to display the 3rd, 4th and 5th columns from the 6th to 9th rows of a dataframe DF.