Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 10 MCQs Data cleanup

ECAP776 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Investigation Easy

    Which pandas method displays the first few rows of a DataFrame?

  2. Question 2 of 60 Investigation Easy

    Which DataFrame attribute returns the number of rows and columns?

  3. Question 3 of 60 Investigation Easy

    Which pandas expression counts missing values in each column?

  4. Question 4 of 60 Investigation Easy

    Which method identifies duplicate rows in a pandas DataFrame?

  5. Question 5 of 60 Investigation Easy

    What does df.info() mainly show?

  6. Question 6 of 60 Investigation Easy

    Which method returns the distinct values in a pandas Series named colors?

  7. Question 7 of 60 Investigation Easy

    Which method provides summary statistics such as count, mean, and standard deviation for numeric columns?

  8. Question 8 of 60 Matching Easy

    Which operator checks whether two Python values are equal?

  9. Question 9 of 60 Matching Easy

    Which pandas method checks whether Series values appear in a given list?

  10. Question 10 of 60 Matching Easy

    Which expression finds rows where the city column contains the text York?

  11. Question 11 of 60 Matching Easy

    In a regular expression, what does \d match?

  12. Question 12 of 60 Matching Easy

    Why might text be converted to lowercase before matching?

  13. Question 13 of 60 Matching Easy

    Which pandas function combines two DataFrames by matching values in a shared key column?

  14. Question 14 of 60 Matching Easy

    What is an exact match?

  15. Question 15 of 60 Formatting Easy

    Which string method removes leading and trailing whitespace?

  16. Question 16 of 60 Formatting Easy

    Which string method changes data cleanup to Data Cleanup?

  17. Question 17 of 60 Formatting Easy

    Which function converts a pandas column to datetime values?

  18. Question 18 of 60 Formatting Easy

    What does round(3.14159, 2) return?

  19. Question 19 of 60 Formatting Easy

    Which pandas method can rename DataFrame columns?

  20. Question 20 of 60 Formatting Easy

    Which Python feature inserts a variable directly into a formatted string?

  21. Question 21 of 60 Investigation Medium

    A pandas DataFrame df contains missing values represented by both None and NaN. Which expression returns the number of missing values in each column?

  22. Question 22 of 60 Investigation Medium

    A column named age was imported with the object data type. Which command is most useful for examining the Python types of its individual values?

  23. Question 23 of 60 Investigation Medium

    Which pandas expression identifies every row that belongs to a duplicated customer_id group, including the first occurrence?

  24. Question 24 of 60 Investigation Medium

    The values in df["status"] should be Open, Closed, or Pending. Which expression most directly reveals unexpected spellings and their frequencies?

  25. Question 25 of 60 Investigation Medium

    For the sorted values [10, 12, 13, 15, 16, 18, 40], suppose , , and the IQR rule uses . Which value is flagged as an upper outlier?

  26. Question 26 of 60 Investigation Medium

    A DataFrame has 1,000 rows, but df["email"].count() returns 940. What does this establish?

  27. Question 27 of 60 Investigation Medium

    Which call best summarizes numerical columns with count, mean, standard deviation, quartiles, minimum, and maximum?

  28. Question 28 of 60 Matching Medium

    Which regular expression matches a string containing exactly five digits and no other characters?

  29. Question 29 of 60 Matching Medium

    Given text = "Order ID: AB-2048 completed", which function call returns the first substring matching the pattern r"[A-Z]{2}-\d{4}"?

  30. Question 30 of 60 Matching Medium

    Two name columns contain " Alice Smith " and "alice smith". Which normalization makes these values equal without changing their word order?

  31. Question 31 of 60 Matching Medium

    A left table contains customer records, while a lookup table maps each customer_id to a region. Which merge keeps every customer even when no region matches?

  32. Question 32 of 60 Matching Medium

    A lookup table unexpectedly has two rows for the same product_id. What can happen when it is merged with a sales table on product_id?

  33. Question 33 of 60 Matching Medium

    Which expression selects rows whose code value starts with two uppercase letters followed by exactly three digits?

  34. Question 34 of 60 Matching Medium

    You need to find approximate duplicates such as "Jon Smyth" and "John Smith". Which technique is most appropriate after basic text normalization?

  35. Question 35 of 60 Formatting Medium

    A column contains dates such as "31/12/2025". Which conversion explicitly interprets them as day/month/year?

  36. Question 36 of 60 Formatting Medium

    A price column contains values such as "$1,250.50". Which operation correctly prepares the strings for conversion with astype(float)?

  37. Question 37 of 60 Formatting Medium

    Which f-string formats value = 0.375 as the string "37.5%"?

  38. Question 38 of 60 Formatting Medium

    A phone column should contain digits only, but values include spaces, parentheses, and hyphens. Which pandas expression removes every non-digit character?

  39. Question 39 of 60 Formatting Medium

    Which expression converts the integer 42 into the zero-padded string "00042"?

  40. Question 40 of 60 Formatting Medium

    A text column contains inconsistent internal whitespace, such as "New York" and "New York". Which expression standardizes every run of whitespace to one space and removes edge whitespace?

  41. Question 41 of 60 Investigation Hard

    Given s = pd.Series([" NA ", "", None, "n/a", "0", " NaN "]), what does clean.isna().sum() return after clean = s.astype("string").str.strip().str.casefold().replace({"": pd.NA, "na": pd.NA, "n/a": pd.NA, "nan": pd.NA})?

  42. Question 42 of 60 Investigation Hard

    A series contains s = pd.Series([" José ", "JOSE\u0301", "Jose", "josé "]). After applying Unicode NFC normalization, trimming, and casefold(), how many rows are marked by duplicated(keep=False)?

  43. Question 43 of 60 Investigation Hard

    For s = pd.Series(["1", "2.0", "1e3", "NaN", "∞", "-"]), let n = pd.to_numeric(s, errors="coerce"). How many elements satisfy np.isfinite(n)?

  44. Question 44 of 60 Investigation Hard

    Using pandas' default linear quantile interpolation, which values are outliers under the rule or for the data [10, 10, 10, 100]?

  45. Question 45 of 60 Investigation Hard

    A DataFrame has rows (A, 1), (A, NaN), (A, NaN), and (B, NaN) in columns group and value. What is the sum of df.duplicated(["group", "value"], keep=False)?

  46. Question 46 of 60 Investigation Hard

    Which expression most accurately counts user-perceived characters in text containing combining marks and multi-code-point emoji?

  47. Question 47 of 60 Matching Hard

    What is the row count of left.merge(right, on="k", how="inner") when left["k"] = [1.0, np.nan, np.nan] and right["k"] = [np.nan, 1.0]?

  48. Question 48 of 60 Matching Hard

    What happens when merging left keys [1, 2, 2] with right keys [1, 2, 2] using pd.merge(..., validate="many_to_one")?

  49. Question 49 of 60 Matching Hard

    Which normalization correctly makes German "Straße" match "STRASSE" for caseless identifier comparison?

  50. Question 50 of 60 Matching Hard

    To accept only complete identifiers such as AB-123 under the pattern [A-Z]{2}-\d{3}, which pandas expression is the safest?

  51. Question 51 of 60 Matching Hard

    Three source records must match three master records one-to-one using a matrix of pairwise edit costs. Which method minimizes the total cost without assigning a master record twice?

  52. Question 52 of 60 Matching Hard

    Records and have similarity , and have similarity , and and have similarity . What risk arises if thresholded matches at are clustered using connected components?

  53. Question 53 of 60 Matching Hard

    A matcher declares two records equal when normalized email or normalized phone agrees. Which rule best prevents two absent values from creating a false match?

  54. Question 54 of 60 Matching Hard

    How many distinct normalized values remain from ["ABC", "ABC", "abc", "Abc"] after applying Unicode NFKC normalization followed by casefold()?

  55. Question 55 of 60 Formatting Hard

    What is produced by [Decimal(x).quantize(Decimal("0.01"), rounding=ROUND_HALF_EVEN) for x in ["2.345", "2.355"]]?

  56. Question 56 of 60 Formatting Hard

    Naive timestamps 2024-11-03 01:30 and 2024-03-10 02:30 are localized to America/New_York with ambiguous="NaT" and nonexistent="shift_forward". Which result is correct?

  57. Question 57 of 60 Formatting Hard

    What tuple results from ("-42".zfill(5), "-42".rjust(5, "0"))?

  58. Question 58 of 60 Formatting Hard

    q = Decimal("-0.004").quantize(Decimal("0.01"), rounding=ROUND_HALF_UP) formats as -0.00. Which operation removes the negative-zero presentation without altering nonzero values?

  59. Question 59 of 60 Formatting Hard

    Which read_csv call preserves both 0012 and the literal text NA from StringIO("id\n0012\nNA\n")?

  60. Question 60 of 60 Formatting Hard

    What does pd.Timestamp("2024-01-01 00:30", tz="UTC").tz_convert("America/New_York").strftime("%Y-%m-%d") return?

That's unit 10

Answer a few questions and your score shows up here.