pandas.array
pandas 3.1.1 · Arrays, scalars, and data types · function
Build a one-dimensional pandas array and optionally specify its dtype.
Call syntax
pd.array(data, dtype=None, copy=True)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
data |
Required Positional or keyword |
Sequence of objects Provide the input data read, transformed, or stored by this call. |
dtype |
Optional Positional or keyword Default None |
str, np.dtype, or ExtensionDtype Choose the data type for the input conversion or result. |
copy |
Optional Positional or keyword Default True |
bool Control whether data is copied where the API supports that choice. |
Returns
ExtensionArray