Q. What is the difference between pivot() and pivot_table() functions?


Answer :-

The pivot() and pivot_table() both perform data pivoting a data set. But with pivot(), if there are multiple entries for a column's value for the same values for index(row), it leads to an error.

The pivot_table() pivots the data by aggregating it, thus it can work with duplicate entries.

Post a Comment

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

Previous Post Next Post