Reshaping and Pivot Tables Flashcards
Data is often stored in _____ or _____ format?
stacked or record format
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 ________
Hierarchical columns
can you select subsets of a pivoted dataframe?
yes
What will happen if the index and column pair is not …..?
unique
what are the two methods that are closely related to pivot() method?
stack() and unstack()
What is the first arg of the method .pivot()?
index=
what type of input does the index parameter take ?
str or object or list
what is the second parameter of the method .pivot()?
—> column=
what are the acceptable inputs of the parameter column?
str or object or list
what is the third parameter of the method .pivot()?
—– values=
what is are the acceptable inputs of the parameter values?
str, object, or list
it is optional
what does the method .pivot() return?
a reshaped data frame
If I want to input multiple values into a parameter in .pivot() what do they need to be surrounded by?
[ ]
Define what the .pivot() method does to a dataframe?
Reshapes the data based on column values.