Skip to content

Commit 5a07ed5

Browse files
authored
Resolves #59670 by documenting that DataFrame.from_records()'s columns filters (includes) data. (#59723)
Update frames.py to factor in explain columns reordering
1 parent 5a3a4f3 commit 5a07ed5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/frame.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2124,9 +2124,10 @@ def from_records(
21242124
columns : sequence, default None
21252125
Column names to use. If the passed data do not have names
21262126
associated with them, this argument provides names for the
2127-
columns. Otherwise this argument indicates the order of the columns
2127+
columns. Otherwise, this argument indicates the order of the columns
21282128
in the result (any names not found in the data will become all-NA
2129-
columns).
2129+
columns) and limits the data to these columns if not all column names
2130+
are provided.
21302131
coerce_float : bool, default False
21312132
Attempt to convert values of non-string, non-numeric objects (like
21322133
decimal.Decimal) to floating point, useful for SQL result sets.

0 commit comments

Comments
 (0)