|
Union[pd.DataFrame, List[Dict[Hashable, Any]]] | _transform (self, pd.DataFrame df, bool fastapi_output, **Any kwargs) |
|
Implements the transformer function for darktable tags to mysql tags
◆ _transform()
Union[pd.DataFrame, List[Dict[Hashable, Any]]] dtlib.colorlabels.DtlibColorLabels._transform |
( |
|
self, |
|
|
pd.DataFrame |
df, |
|
|
bool |
fastapi_output, |
|
|
**Any
|
kwargs |
|
) |
| |
|
protected |
Transforms the original color_labels table from darktable into a MySQL table.
This function maps numerical color codes to their respective color names
and adds a 'color_text' column to the dataframe. It returns the transformed
dataframe or a list of dictionaries if `fastapi_output` is True.
:param df: The source dataframe containing color codes.
:param fastapi_output: Whether the output should be a list of dictionaries or a dataframe.
:param kwargs: Additional keyword arguments.
:return: The transformed dataframe or a list of dictionaries.
The documentation for this class was generated from the following file: