DOC: Fixed documentation for pivot_table margins (#48916) (#48965)
DOC: Fixed documentation for pivot_table margins (#48916) (#48965)

* DOC: Fixed documentation for pivot_table margins (#48916)

The documentation for the margins parameter of pivot_table
was incorrect. It said that the parameter added rows and columns,
but it actually passed them to aggfunc. I used the documentation
from the user guide to replace the old documentation, as well as
added a sentence to the documentation for aggfunc that explained
its role in calculating margins.

* Update pandas/core/frame.py

Co-authored-by: Matthew Roeschke <9dca85e0e0336bb8c142cced392e70dc0a36771c@users.noreply.github.com>

Co-authored-by: Matthew Roeschke <9dca85e0e0336bb8c142cced392e70dc0a36771c@users.noreply.github.com>
pandas-dev/pandas,pandas-dev/pandas,pandas-dev/pandas,pandas-dev/pandas