update the pandas.Series.str.repeat docstring
State: closed

Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):

- [x] PR title is "DOC: update the <your-function-or-method> docstring"
- [x] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`
- [x] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] The html version looks good: `python doc/make.py --single <your-function-or-method>`
- [x] It has been proofread on language by another sprint participant

```
################################################################################
##################### Docstring (pandas.Series.str.repeat) #####################
################################################################################

Duplicate each string repeated by indicated number of times.

Parameters
----------
repeats : int or array
    Same value for all (int) or different value per (array).

Returns
-------
repeated : Series/Index of objects
    Same type as the original object

Examples
--------
>>> s = pd.Series(['a', 'b', 'c', 'd', 'e'])

Using same value for all:

>>> s.str.repeat(4)
0    aaaa
1    bbbb
2    cccc
3    dddd
4    eeee
dtype: object

Using different value per element:

>>> s.str.repeat([3, 2, 5, 1, 4])
0      aaa
1       bb
2    ccccc
3        d
4     eeee
dtype: object

Passing zero or negative integer will return an empty string

>>> s.str.repeat([0, 0, -2, -1, 0])
0
1
2
3
4
dtype: object

Notes
--------
A passed value of zero or negative integer will return an empty string.

See also
--------
numpy.ndarray.repeat: Repeat elements of an array.

################################################################################
################################## Validation ##################################
################################################################################

Errors found:
	No extended summary found
```

If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.


Checklist for other PRs (remove this part if you are doing a PR for the pandas documentation sprint):

- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Docs
name: Strings
description: String extension data type and string data

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20634?src=pr&el=h1) Report
> Merging [#20634](https://codecov.io/gh/pandas-dev/pandas/pull/20634?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/3285bdc8e6e1b05d84b6cebea66fdd80fbb84400?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/20634/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/20634?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #20634      +/-   ##
==========================================
- Coverage   92.04%   92.04%   -0.01%     
==========================================
  Files         169      169              
  Lines       50787    50787              
==========================================
- Hits        46746    46745       -1     
- Misses       4041     4042       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.45% <ø> (-0.01%)` | :arrow_down: |
| #single | `42.29% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/20634?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/strings.py](https://codecov.io/gh/pandas-dev/pandas/pull/20634/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3RyaW5ncy5weQ==) | `98.63% <ø> (ø)` | :arrow_up: |
| [pandas/util/\_depr\_module.py](https://codecov.io/gh/pandas-dev/pandas/pull/20634/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvX2RlcHJfbW9kdWxlLnB5) | `65.11% <0%> (-2.33%)` | :arrow_down: |
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/20634/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `95.41% <0%> (ø)` | :arrow_up: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/20634/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.2% <0%> (ø)` | :arrow_up: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/20634/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.45% <0%> (ø)` | :arrow_up: |
| [pandas/core/resample.py](https://codecov.io/gh/pandas-dev/pandas/pull/20634/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzYW1wbGUucHk=) | `96.13% <0%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20634?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20634?src=pr&el=footer). Last update [3285bdc...1f6204a](https://codecov.io/gh/pandas-dev/pandas/pull/20634?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@manojpandey do you have time to make the changes based on the review?
Hey @datapythonista - surely. I totally missed this. Thanks for reminding :) Let me make the changes!
@manojpandey If you have time now that PyData Delhi is over, that would be great. :) Otherwise I'll try to find time to make the fixes and merge myself.
Yes, I'm updating this. Thanks for understanding. I should have done it wayy before :(

Let me send the PR this Mon/Tue!
I just pushed all the changes requested. Please have a look when you get a moment. Thanks, and apologies again for the delay.
Thanks for the update @manojpandey , seems like @JesperDramsch has been working on the same changes in #22571. Can the two of you discuss which PR makes more sense to keep? Sorry I've been encouraging too much to work on the `Series.str` methods, and we ended up with overlapping work.
Haha, the sprint-prophecy has been fulfilled. 
Hi, I feel that this current PR has better examples than those of #22571 - and if no (or minimum) changes are required, can we move forward to merge this and close it? @datapythonista 

@JesperDramsch What are your thoughts?

Thanks!
I think both have some things that are better, whoever feels like integrating the best of both, and addressing any additional feedback is welcome to do so. :)
Hej @manojpandey, I think it's great you document the effect of repeat values <1. I wonder why you think these are significantly better, but personally, I don't have too many stakes in my PR, so it's fine if we close mine and you update yours.

Things I see that should be done here are:

- Mention the keyword in the call
- Update the Returns string
- Remove the word array and replace it with sequence to make it package agnostic

You have been working at this much longer, so feel free to take it to the end.
@JesperDramsch Thanks for your feedback on this, really appreciated - and I've incorporated the changes. I updated the `Returns` string part from your PR, thanks for that!

@datapythonista can you see if everything is alright now?
Hello @manojpandey! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/core/strings.py`](https://github.com/manojpandey/pandas/blob/1f6204abb85cc37f013165004497cdec7fe1cfeb/pandas/core/strings.py) !


Sure, updating with the changes requested.
Closing in favor of #22571

Thanks @manojpandey for the work on this. Feel free to make improvements to the docstring in a new PR.