classmethod DataFrame.from_records(data, index=None, exclude=None, columns=None, coerce_float: bool = False, nrows: int | None = None, nan_as_null=False)[source]#

Convert structured or record ndarray to DataFrame.

datanumpy structured dtype or recarray of ndim=2
indexstr, array-like

The name of the index column in data. If None, the default index is used.

excludesequence, default None

Columns or fields to exclude. Currently not implemented.

columnslist of str

List of column names to include.

coerce_floatbool, default False

Attempt to convert values of non-string, non-numeric objects (like decimal.Decimal) to floating point, useful for SQL result sets. Currently not implemented.

nrowsint, default None

Number of rows to read if data is an iterator. Currently not implemented.