Repository: pandas-dev/pandas
Issue category: Bug Report

Issue:
DOC: Dataframe.from_records should not say that passing in a DataFrame for data is allowed
### Pandas version checks

- [X] I have checked that the issue still exists on the latest versions of the docs on `main` [here](https://pandas.pydata.org/docs/dev/)


### Location of the documentation

https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.from_records.html#pandas.DataFrame.from_records

### Documentation problem

The first text in the docstring says (emphasis at the end is mine)

> Convert structured or record ndarray to DataFrame.
>
> Creates a DataFrame object from a structured ndarray, sequence of
> tuples or dicts, or **DataFrame**.

However, starting in 2.1.0, passing in a DataFrame has been deprecated. In 2.1.0 it would raise a FutureWarning; in main it will raise a TyperError.

The documentation between 2.1.0 and main appear to have been updated to remove text in the Parameters section of the docstring that still said a DataFrame could be passed in for data, but the text in the initial section of the docstring was not.

### Suggested fix for documentation

Change the initial docstring text to be:

> Convert structured or record ndarray to DataFrame.
>
> Creates a DataFrame object from a structured ndarray or sequence of
> tuples or dicts.


Hints:
Thanks for the report, PRs to fix are welcome!
take

Patch:
diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index b35e2c8497fb7..34eb198b4b4da 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -2115,8 +2115,8 @@ def from_records(
         """
         Convert structured or record ndarray to DataFrame.
 
-        Creates a DataFrame object from a structured ndarray, sequence of
-        tuples or dicts, or DataFrame.
+        Creates a DataFrame object from a structured ndarray, or sequence of
+        tuples or dicts.
 
         Parameters
         ----------


Test patch: