DataFrame column count assertion
Passes if the DataFrame has exactly n columns.
df (DataFrame): The DataFrame to
check.
n (Int): Expected column
count.
Expect_pass when column count matches;
Expect_hold on NA; Expect_stop on errors or
mismatch.
assert(expect_ncol(to_dataframe([x: [1], y = [2]]), 2))