Q. Explain the difference between pivot() and pivot_table() function?


Answer :-

pivot()  is used for pivoting without aggregation.
Therefor, it can’t deal with duplicate values for one index/column pair.

On the other hand, pivot_table() will work
because it will handle duplicate values by aggregating them.


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post