S

Shyam Dubey • 3.70K Points
Extraordinary

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: 6
  • Filed under category Pandas
  • Hashtags:

Explanation by: Shyam Dubey
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.

Be the first to start discuss.