DOC: Fixed examples in pandas/core/groupby/#33230
Conversation
pandas/core/groupby/pandas/core/groupby/
| Essentially this is equivalent to | ||
|
|
||
| >>> self.apply(lambda x: pd.Series(np.arange(len(x)), x.index)) | ||
| self.apply(lambda x: pd.Series(np.arange(len(x)), x.index)) |
There was a problem hiding this comment.
Does this still render as code when you build the docs?
There was a problem hiding this comment.
There was a problem hiding this comment.
Is keeping this as it was not an option? I don’t think we add code-blocks to docstring normally since they are oriented more towards generated HTML / PDF output and aren’t super useful in say a shell
There was a problem hiding this comment.
The only solution that comes to my mind is to add # doctest: +SKIP to this.
There was a problem hiding this comment.
@jreback do you know how we typically handle these? I don't think we use code-block in docstrings do we?
There was a problem hiding this comment.
@WillAyd We actually do: (although I'm not sure if this is wanted)
pandas/pandas/core/accessor.py
Lines 223 to 266 in cabc31a
There was a problem hiding this comment.
May be using triple backticks? Otherwise, a skip seems reasonable. Or may be @jorisvandenbossche has a better idea.
datapythonista
left a comment
There was a problem hiding this comment.
lgtm, thanks @MomIsBestFriend
|
Thanks @MomIsBestFriend |
black pandasgit diff upstream/master -u -- "*.py" | flake8 --diff