Create an empty DataFrame
Create a DataFrame from a JavaScript object
object or array of data
Optional
options: { options
Optional
columns?: any[]column names
Optional
inferThe maximum number of rows to scan for schema inference. If set to None, the full data may be scanned (this can be slow). This parameter only applies if the input data is a sequence or generator of rows; other input is read as-is. The number of entries in the schema should match the underlying data dimensions, unless a sequence of dictionaries is being passed, in which case a partial schema can be declared to prevent specific fields from being loaded.
Optional
orient?: "row" | "col"orientation of the data [row, col] Whether to interpret two-dimensional data as columns or as rows. If None, the orientation is inferred by matching the columns and data dimensions. If this does not yield conclusive results, column orientation is used.
Optional
schema?: Record<string, string | DataType>The schema of the resulting DataFrame. The schema may be declared in several ways:
- As a dict of {name:type} pairs; if type is None, it will be auto-inferred.
- As a list of column names; in this case types are automatically inferred.
- As a list of (name,type) pairs; this is equivalent to the dictionary form.
If you supply a list of column names that does not match the names in the underlying data, the names given here will overwrite them. The number of names given in the schema should match the underlying data dimensions.
If set to null (default), the schema is inferred from the data.
Optional
schemaSupport type specification or override of one or more columns; note that any dtypes inferred from the schema param will be overridden.
DataFrame constructor