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