This is a good question :).
Keras does not support string labels for classification. Therefore, labels should be provided as a positive integer.
The function pd_dataframe_to_tf_dataset
runs an automatic string->integer conversion if the labels are stored as strings. If the label is already an integer, no mapping is applied. The string->integer mapping follows the lexicographic order (see code). This cannot be changed as the moment.
To obtain a model with a specific mapping, the simplest solution is to apply the desired mapping on the dataset manually before the training e.g. dataframe["label"] = dataframe["label"].map(my_mapping)
.