DOC: Validate in docstrings that numpy and pandas are not imported
State: closed

Fix #23134

Labels:
name: Docs
name: CI
description: Continuous Integration

Comments:
Hello @thoo! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`scripts/tests/test_validate_docstrings.py`](https://github.com/thoo/pandas/blob/8655fdd4a968f1b5df4e99acab9381349f22767f/scripts/tests/test_validate_docstrings.py) !

 - There are no PEP8 issues in the file [`scripts/validate_docstrings.py`](https://github.com/thoo/pandas/blob/8655fdd4a968f1b5df4e99acab9381349f22767f/scripts/validate_docstrings.py) !


# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23161?src=pr&el=h1) Report
> Merging [#23161](https://codecov.io/gh/pandas-dev/pandas/pull/23161?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/d78bd7a65f87022bae5021d36c8656c0ea5a7b76?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #23161   +/-   ##
=======================================
  Coverage   92.23%   92.23%           
=======================================
  Files         161      161           
  Lines       51197    51197           
=======================================
  Hits        47220    47220           
  Misses       3977     3977
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.61% <ø> (ø)` | :arrow_up: |
| #single | `42.27% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23161?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/23161?src=pr&el=footer). Last update [d78bd7a...ce37c8a](https://codecov.io/gh/pandas-dev/pandas/pull/23161?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@datapythonista  Thanks for the review. Really appreciate it. Will be back. :)
@datapythonista  Thanks for the help. It looks like one of Travis' tests failed last run. Is it possible conda update in Travis somehow breaks it? I am learning a lot. :):)
Can't check the travis logs now, but if ut's failing when installing anaconda the only thing we can do is run the build again. For it, you usually update your beanch from master and push it. So, you don't change anything, but as the PR is updated travis runs again. In this case as you did changes is not needed.
The travis failure can be ignored.

I restarted the azure build. That failed with a pyarrow could not load DLL issue.
Thank you guys. Appreciate it!!!
@WillAyd can you take a look and merge if you're happy?
@WillAyd Could you re-review this? I updated it with your suggestion. 
@WillAyd  I just resolve the conflicts with the base branch and it should be ready for re-review. Thanks.
@datapythonista Thanks for the review. I update the files. 
Thanks once more @thoo, will merge on green.
Thanks!