hi @Krzysztof,
i think you can get what you want by using the features argument of Dataset.from_pandas:
from datasets import Dataset, Value, ClassLabel, Features

text = ["John", "snake", "car", "tree", "cloud", "clerk", "bike"]
labels = [0,1,2,3,4,0,2]
df = pd.DataFrame({"text": text, "label": labels})# define data set object
features = Features({"text": Value("string"), "label": ClassLabel(num_classes=5, names=[0,1,2,3,4])})
ds = Dataset.from_pandas(df, features=features)
ds.features
# {'text': Value(dtype='string', id=None),
#  'label': ClassLabel(num_classes=5, names=[0, 1, 2, 3, 4], names_file=None, id=None)}