Skip to main contentSkip to solution

Match the following DataFrame methods with their description:

List-IList-II
(A) add()(I) change data type of a column
(B) drop_duplicates()(II) add value along a row or column
(C) GROUP BY()(III) group data based on column
(D) stype()(IV) remove duplicate rows

Solution

✅ Correct Option: 2
List IList II
(A) add()(II) add value along a row or column
(B) drop_duplicates()(IV) remove duplicate rows
(C) GROUP BY()(III) group data based on column
(D) stype()(I) change data type of a column

"stype()" is the question's spelling of astype(), which converts a column to another data type, e.g. df['col'].astype(float).

In pandas the grouping method is written groupby(); "GROUP BY" with a space is the SQL clause.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question