The shape attribute returns a tuple representing the dimensions of the DataFrame. The first element is the number of rows, and the second element is the number of columns.