CSE 6040 - 7.2 - Tibbles(Tidy Tables) & Bits - Code Flashcards

1
Q

What code do you use to canonicalize the columns of a tibble? Say the Tibble is X.

A
**var\_names = sorted(X.columns)
Y = X[var\_names].copy()**
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How would you canonicalize the row values within a tibble if the tibble is Y?

A

Y.sort_values (by=var_names, inplace=True)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How would you canonicalize the index value within a tibble if the tibble is Y?

A

Y.set_index([list(range(0, len(Y)))], inplace=True)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly