# pydicom.dataelem.DataElement_from_raw

pydicom.dataelem.DataElement_from_raw(raw_data_element: RawDataElement, encoding: str | MutableSequence[str] | None = None, dataset: Dataset | None = None) → DataElement

  Return a `DataElement` created from raw_data_element.

  Parameters:

    - raw_data_element (RawDataElement) – The raw data to convert to a `DataElement`.

    - encoding (str or list of str, optional) – The character encoding of the raw data.

    - dataset (Dataset, optional) – If given, used to resolve the VR for known private tags.

  Return type:

    DataElement

  Raises:

    KeyError – If raw_data_element belongs to an unknown non-private tag and `reading_validation_mode` is set to `RAISE`.