Step 1: Understanding the Question:
The question asks for the specific attribute in Pandas that is used to get the transpose of a DataFrame (swapping rows and columns).
Step 2: Key Formula or Approach:
In linear algebra and data analysis, transposing a matrix or data table swaps its rows with its columns.
In Pandas, the transpose of a DataFrame can be accessed using the property .T or the method .transpose().
Step 3: Detailed Explanation:
Let's analyze the properties of a Pandas DataFrame:
- df.T is an accessor property that transposes the index and columns of the DataFrame.
- It is equivalent to calling df.transpose(), but the attribute .T is much more common and concise.
Let's evaluate the options:
- DataFrame.TP is invalid.
- DataFrame.Trans is invalid.
- DataFrame.T is the correct attribute.
- DataFrame.Transpose starts with an uppercase 'T', which is incorrect (it should be lowercase transpose() as a function call with parentheses). Thus, the exact attribute match is DataFrame.T.
Therefore, option (C) is the correct answer.
Step 4: Final Answer:
The correct option is (C).