peal.data.tabular_datasets.decode_adult_codes¶
- peal.data.tabular_datasets.decode_adult_codes(df)[source]¶
Map an integer-coded Adult table back to its category strings.
Only used when the
data.csvon disk is the category-coded artefact of the superseded code path rather than a raw download. Refuses rather than guesses: a column is decoded only when its observed codes are exactly0..len(cats)-1.- Parameters:
df (
pandas.DataFrame) – Table whose categorical columns hold integer codes.- Returns:
Copy with those columns replaced by their category strings.
- Return type:
pandas.DataFrame