S

Sikhar Chaudhary • 5.88K Points
Tutor III

Q. Which of the following is used to select a column in a pandas DataFrame?

  • (A) df.column_name
  • (B) df['column_name']
  • (C) Both A and B
  • (D) df.select_column()
  • Correct Answer - Option(C)
  • Views: 32
  • Filed under category Pandas

Explanation by: Sikhar Chaudhary
You can select a column using dot notation (df.column_name) or dictionary-style indexing (df['column_name']).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics