Reshaping and Pivot Tables Flashcards

1
Q

Data is often stored in _____ or _____ format?

A

stacked or record format

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

if the value arguement is omitted , and the input dataframe has more than one column of values which are not used as column or index inputs to pivot(), then the resulting dataframe will have a ________

A

Hierarchical columns

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

can you select subsets of a pivoted dataframe?

A

yes

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

What will happen if the index and column pair is not …..?

A

unique

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

what are the two methods that are closely related to pivot() method?

A

stack() and unstack()

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

What is the first arg of the method .pivot()?

A

index=

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

what type of input does the index parameter take ?

A

str or object or list

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

what is the second parameter of the method .pivot()?

A

—> column=

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

what are the acceptable inputs of the parameter column?

A

str or object or list

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

what is the third parameter of the method .pivot()?

A

—– values=

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

what is are the acceptable inputs of the parameter values?

A

str, object, or list

it is optional

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

what does the method .pivot() return?

A

a reshaped data frame

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

If I want to input multiple values into a parameter in .pivot() what do they need to be surrounded by?

A

[ ]

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

Define what the .pivot() method does to a dataframe?

A

Reshapes the data based on column values.

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