set_list_field

set_list_field#

NestedExtensionArray.set_list_field(field: str, value: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], *, keep_dtype: bool = False) None[source]#

Set the field from list-array

Note that if this updates the dtype, it would not affect the dtype of the NestedSeries back-ended by this extension array.

Parameters:
  • field (str) – The name of the field.

  • value (ArrayLike) – The list-array of values to be set.

  • 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.