Skip to main contentSkip to solution

Arrange the following in order of their occurrence.

(A). Use isnull() to find the missing values.

(B). Use fillna() to fill in the missing values.

(C). Import pandas and read csv.

(D). Use pd.get_dummies for label encoding.

Solution

✅ Correct Option: 2

(C) Import pandas and read the csv, since the data must be loaded before anything else.

(A) Use isnull() to find the missing values.

(B) Use fillna() to fill in the missing values found.

(D) Use pd.get_dummies to encode categorical columns, once the data is clean.


Options 3 and 4: fillna() is placed before isnull(), but you must detect missing values before filling them.

pd.get_dummies actually does one-hot encoding, not label encoding.

Keyboard Shortcuts

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