noatamir/pyladies-berlin-sprints

DOC: Add YD01 to validate_docstrings codes & fix related errors

Opened this issue · 0 comments

First: run:

python scripts/validate_docstrings.py --errors YD01

should give these errors:

/Users/marcogorelli/pandas-dev/pandas/core/groupby/groupby.py:753:YD01:pandas.core.resample.Resampler.__iter__:No Yields section found
/Users/marcogorelli/pandas-dev/pandas/core/groupby/groupby.py:753:YD01:pandas.core.groupby.GroupBy.__iter__:No Yields section found
/Users/marcogorelli/pandas-dev/pandas/core/groupby/groupby.py:2364:YD01:pandas.core.groupby.GroupBy.ohlc:No Yields section found
/Users/marcogorelli/pandas-dev/pandas/core/frame.py:1345:YD01:pandas.DataFrame.itertuples:No Yields section found
/Users/marcogorelli/pandas-dev/pandas/core/frame.py:9552:YD01:pandas.DataFrame.round:No Yields section found

first: pandas.pydata.org/docs/reference/api/pandas.DataFrame.info.html

remove data from:

pandas-dev/pandas@06d2301/pandas/io/formats/info.py#L251-L262

Some of these should have a yield section and are easy to do:
CORRECT documentation that has a yields section: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.iterrows.html
NEEDS FIX Something similar should appear for https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.itertuples.html

Some of these it's not clear why the error is present and they might be less straight forward to fix:
CORRECT documentation that doesn't have a yields section: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.__iter__.html
NEEDS FIX https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.GroupBy.__iter__.html This one causes an error, possibly because the word yielding appears. Try rephrasing?!