updated empty in `pandas.DataFrame.empty` or  `pandas.Series.empty` docstrings
State: closed

- [x] closes ##42697



Labels:
name: Stale

Comments:
Whenever I am trying to run this command `python make.py --single pandas.Series.empty`

I am getting this error. Please help me @MarcoGorelli 

```bash
File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\__init__.py", line 22, in <module>
    from pandas.compat import is_numpy_dev as _is_numpy_dev
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\compat\__init__.py", line 15, in <module>
    from pandas.compat.numpy import (
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\compat\numpy\__init__.py", line 7, in <module>
    from pandas.util.version import Version
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\util\__init__.py", line 1, in <module>
    from pandas.util._decorators import (  # noqa
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\util\_decorators.py", line 14, in <module>
    from pandas._libs.properties import cache_readonly  # noqa
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\_libs\__init__.py", line 12, in <module>
    from pandas._libs.interval import Interval
ModuleNotFoundError: No module named 'pandas._libs.interval'
```
you'll need to rebuild the c extensions - see https://pandas.pydata.org/pandas-docs/stable/development/contributing_environment.html#id4

```
python -m pip install -e . --no-build-isolation --no-use-pep517
```
I apologize, I am asking too much.
Thank you so much for helping me out @MarcoGorelli , I used all the steps exactly and still unable to generate the docs
> In the doc folder I used the command `python make.py html`

```
Traceback (most recent call last):
  File "C:\Users\vskis\PycharmProjects\pandas-doc\doc\make.py", line 377, in <module>
    sys.exit(main())
  File "C:\Users\vskis\PycharmProjects\pandas-doc\doc\make.py", line 373, in main
    return getattr(builder, args.command)()
  File "C:\Users\vskis\PycharmProjects\pandas-doc\doc\make.py", line 231, in html
    ret_code = self._sphinx_build("html")
  File "C:\Users\vskis\PycharmProjects\pandas-doc\doc\make.py", line 148, in _sphinx_build
    return subprocess.call(cmd)
  File "C:\Users\vskis\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Users\vskis\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 947, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\vskis\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1416, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
```
I don't know, I've not seen that before  - @datapythonista do you know?
No idea what the problem can be. I'd start again with a clean environment and repo, and see if that fixes the problem. No other ideas, Sphinx is extremly difficult to debug, I wouldn't try.
I've tried `shell=True` in 148 line of `make.py` and it worked. 

https://github.com/pandas-dev/pandas/blob/daec2e73b48fe34086dcdeeb0858d29536b6ca6a/doc/make.py#L148
I am unable to add `@doc()` to the property so added examples.

I will also raise an issue for this. 
```bash
>>> df_empty = pd.Series({'A' : []})
>>> df_empty.empty
False
```
> I am unable to add @doc() to the property

I think what you'd done in the previous commit was on the right track - could you try that again, then try building the docs just for this method (something like `python make.py --single pandas.DataFrame.empty`, check the contributing guide), and post what you get?
> > I am unable to add @doc() to the property
> 
> I think what you'd done in the previous commit was on the right track - could you try that again, then try building the docs just for this method (something like `python make.py --single pandas.DataFrame.empty`, check the contributing guide), and post what you get?

Sure will try that too @MarcoGorelli Thanks !  But facing errors for this line 
```
        @property
   ---> @doc(**_shared_doc_kwargs)
        def empty(self) -> bool_t:
```

can you show the errors please?
> can you show the errors please?

```
Traceback (most recent call last):
  File "C:\Users\vskis\PycharmProjects\pandas-doc\doc\make.py", line 377, in <module>
    sys.exit(main())
  File "C:\Users\vskis\PycharmProjects\pandas-doc\doc\make.py", line 359, in main
    globals()["pandas"] = importlib.import_module("pandas")
  File "C:\Users\vskis\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\__init__.py", line 47, in <module>
    from pandas.core.api import (
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\core\api.py", line 48, in <module>
    from pandas.core.groupby import (
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\core\groupby\__init__.py", line 1, in <module>
    from pandas.core.groupby.generic import (
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\core\groupby\generic.py", line 72, in <module>
    from pandas.core.frame import DataFrame
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\core\frame.py", line 132, in <module>
    from pandas.core import (
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\core\generic.py", line 190, in <module>
    class NDFrame(PandasObject, indexing.IndexingMixin):
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\core\generic.py", line 1936, in NDFrame
    def empty(self: FrameOrSeries) -> bool_t:
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\util\_decorators.py", line 388, in decorator
    [
  File "C:\Users\vskis\PycharmProjects\pandas-doc\pandas\util\_decorators.py", line 389, in <listcomp>
    component.format(**params)
KeyError: 'kclass'
```
Hello @MarcoGorelli , I performed `overloading` and it worked for documentation. Do you think the code works when we call `Series.empty` ?

``` bash
    @property
    def empty(self) -> bool:
         """ FULL DOCSTRING HERE"""
         return NDFrame.empty
```

Try building the docstring for other functions which use `@doc`, see if they work - if so, then try to figure out what's different
> Try building the docstring for other functions which use `@doc`, see if they work - if so, then try to figure out what's different

Working on it, thanks @MarcoGorelli 
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.
closing as stale for now, let me know if you want to keep working on it