fill_field_lists#
- NestedExtensionArray.fill_field_lists(field: str, value: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], *, keep_dtype: bool = False) None[source]#
Fill list-arrays with values from the input array
The input value array must have as many elements as the array, e.g. number of lists, not number of elements in the lists.
.fill_value(“a”, [1,2,3]) would set “a” to be [1, 1, …], [2, 2, …], [3, 3, …]
- Parameters:
field (str) – The name of the field to fill.
value (ArrayLike) – The array of values to fill the field with. The length of the array is len(self).
keep_dtype (bool, default False) – Whether to keep the original dtype of the field. If True, now new field will be created, and the dtype of the existing field will be kept. If False, the dtype of the field will be inferred from the input value.