DOC: edit docstring example to prevent segfault (#21824)
See https://github.com/pandas-dev/pandas/issues/21824 for the segfault description, changing the example so running the doctests will work: https://github.com/pandas-dev/pandas/pull/19952
Nice to see this fixed.  Did you figure out what about the existing version was causing the problem? > Did you figure out what about the existing version was causing the problem?

No, see the details in #21824 for the segfault. This PR is simply changing the example to not run into the problem .. Merged this already (I don't think it is in any way controversial, and only doc change), as I want to test if now the doc tests works