# pydicom.dataelem.DataElement_from_raw

pydicom.dataelem.DataElement_from_raw(raw_data_element: pydicom.dataelem.RawDataElement, encoding: Optional[Union[str, MutableSequence[str]]] = None, dataset: Optional[Dataset] = None) → pydicom.dataelem.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.

  Returns

  Return type

    DataElement

  Raises

    KeyError – If raw_data_element belongs to an unknown non-private tag and config.enforce_valid_values is set.