Pandas version checks
Location of the documentation
https://pandas.pydata.org/docs/dev/development/contributing_docstring.html#conventions-for-the-examples
Documentation problem
There's a general preference to use ser = instead of s = in examples
Per @MarcoGorelli
Suggested fix for documentation
Change s to ser on paragraph:
"When illustrating examples with a single Series use the name s, and if illustrating with a single DataFrame use the name df. For indices, idx is the preferred name. If a set of homogeneous Series or DataFrame is used, name them s1, s2, s3"