I just started using tensorflow-datasets
and I'm a bit puzzled. I spent almost an hour googling it and I still cannot find a way to get feature names in a dataframe. I guess I'm missing something obvious.
import tensorflow_datasets as tfds
ds, ds_info = tfds.load('iris', split='train',
shuffle_files=True, with_info=True)
tfds.as_dataframe(ds.take(10), ds_info)
I'd like to know which feature is what: sepal_length, sepal_width, petal_length, petal_width. But I'm stuck with a single ndarray
.
I can get class names:
ds_info.features["label"].names
is giving me: ['Iris-setosa', 'Iris-versicolor', 'Iris-virginica']
, but
ds_info.features["features"]
gives me nothing: Tensor(shape=(4,), dtype=float32)
In summary, my question: any idea how to identify input ndarray content with features names like "sepal_length", "sepal_width", "petal_length", "petal_width"?