# How we can view our downloaded Tensorflow\_datasets?

**URL:** <https://discuss.ai.google.dev/t/how-we-can-view-our-downloaded-tensorflow-datasets/29252>\
**Category:** General Discussion\
**Tags:** datasets, tfdata\
**Created:** [February 12, 2024, 7:30am UTC](https://discuss.ai.google.dev/t/how-we-can-view-our-downloaded-tensorflow-datasets/29252 "2024-02-12T07:30:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Priyank\_Dubey](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/priyank_dubey/32/8652_2.png) [@Priyank\_Dubey](https://discuss.ai.google.dev/u/Priyank_Dubey)\
**Post date:** [February 12, 2024, 7:30am UTC](https://discuss.ai.google.dev/t/how-we-can-view-our-downloaded-tensorflow-datasets/29252/1 "2024-02-12T07:30:37Z")

</div>

I want to view my downloaded data in tensor flow

# Ratings data.

ratings = tfds.load(‘movielens/100k-ratings’, split=“train”)

# Features of all the available movies.

movies = tfds.load(‘movielens/100k-movies’, split=“train”)

# Select the basic features.

ratings = ratings.map(lambda x: {  
“movie\_title”: x[“movie\_title”],  
“user\_id”: x[“user\_id”]  
})  
movies = movies.map(lambda x: x[“movie\_title”])

---

<div class="post-metadata">

**Author:** ![Kiran\_Sai\_Ramineni](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/kiran_sai_ramineni/32/8859_2.png) [@Kiran\_Sai\_Ramineni](https://discuss.ai.google.dev/u/Kiran_Sai_Ramineni)\
**Post date:** [February 12, 2024, 8:40am UTC](https://discuss.ai.google.dev/t/how-we-can-view-our-downloaded-tensorflow-datasets/29252/3 "2024-02-12T08:40:58Z")

</div>

Hi @Priyank_Dubey, You can view the data present in the ratings dataset using

```auto
for data in ratings.take(5):
  print(data)

```

The output looks like

```auto
{'bucketized_user_age': <tf.Tensor: shape=(), dtype=float32, numpy=45.0>, 'movie_genres': <tf.Tensor: shape=(1,), dtype=int64, numpy=array([7])>, 'movie_id': <tf.Tensor: shape=(), dtype=string, numpy=b'357'>, 'movie_title': <tf.Tensor: shape=(), dtype=string, numpy=b"One Flew Over the Cuckoo's Nest (1975)">, 'raw_user_age': <tf.Tensor: shape=(), dtype=float32, numpy=46.0>, 'timestamp': <tf.Tensor: shape=(), dtype=int64, numpy=879024327>, 'user_gender': <tf.Tensor: shape=(), dtype=bool, numpy=True>, 'user_id': <tf.Tensor: shape=(), dtype=string, numpy=b'138'>, 'user_occupation_label': <tf.Tensor: shape=(), dtype=int64, numpy=4>, 'user_occupation_text': <tf.Tensor: shape=(), dtype=string, numpy=b'doctor'>, 'user_rating': <tf.Tensor: shape=(), dtype=float32, numpy=4.0>, 'user_zip_code': <tf.Tensor: shape=(), dtype=string, numpy=b'53211'>}
{'bucketized_user_age': <tf.Tensor: shape=(), dtype=float32, numpy=25.0>, 'movie_genres': <tf.Tensor: shape=(2,), dtype=int64, numpy=array([4, 14])>, 'movie_id': <tf.Tensor: shape=(), dtype=string, numpy=b'709'>, 'movie_title': <tf.Tensor: shape=(), dtype=string, numpy=b'Strictly Ballroom (1992)'>, 'raw_user_age': <tf.Tensor: shape=(), dtype=float32, numpy=32.0>, 'timestamp': <tf.Tensor: shape=(), dtype=int64, numpy=875654590>, 'user_gender': <tf.Tensor: shape=(), dtype=bool, numpy=True>, 'user_id': <tf.Tensor: shape=(), dtype=string, numpy=b'92'>, 'user_occupation_label': <tf.Tensor: shape=(), dtype=int64, numpy=5>, 'user_occupation_text': <tf.Tensor: shape=(), dtype=string, numpy=b'entertainment'>, 'user_rating': <tf.Tensor: shape=(), dtype=float32, numpy=2.0>, 'user_zip_code': <tf.Tensor: shape=(), dtype=string, numpy=b'80525'>}
{'bucketized_user_age': <tf.Tensor: shape=(), dtype=float32, numpy=18.0>, 'movie_genres': <tf.Tensor: shape=(1,), dtype=int64, numpy=array([4])>, 'movie_id': <tf.Tensor: shape=(), dtype=string, numpy=b'412'>, 'movie_title': <tf.Tensor: shape=(), dtype=string, numpy=b'Very Brady Sequel, A (1996)'>, 'raw_user_age': <tf.Tensor: shape=(), dtype=float32, numpy=24.0>, 'timestamp': <tf.Tensor: shape=(), dtype=int64, numpy=882075110>, 'user_gender': <tf.Tensor: shape=(), dtype=bool, numpy=True>, 'user_id': <tf.Tensor: shape=(), dtype=string, numpy=b'301'>, 'user_occupation_label': <tf.Tensor: shape=(), dtype=int64, numpy=17>, 'user_occupation_text': <tf.Tensor: shape=(), dtype=string, numpy=b'student'>, 'user_rating': <tf.Tensor: shape=(), dtype=float32, numpy=4.0>, 'user_zip_code': <tf.Tensor: shape=(), dtype=string, numpy=b'55439'>}
{'bucketized_user_age': <tf.Tensor: shape=(), dtype=float32, numpy=50.0>, 'movie_genres': <tf.Tensor: shape=(2,), dtype=int64, numpy=array([5, 7])>, 'movie_id': <tf.Tensor: shape=(), dtype=string, numpy=b'56'>, 'movie_title': <tf.Tensor: shape=(), dtype=string, numpy=b'Pulp Fiction (1994)'>, 'raw_user_age': <tf.Tensor: shape=(), dtype=float32, numpy=50.0>, 'timestamp': <tf.Tensor: shape=(), dtype=int64, numpy=883326919>, 'user_gender': <tf.Tensor: shape=(), dtype=bool, numpy=True>, 'user_id': <tf.Tensor: shape=(), dtype=string, numpy=b'60'>, 'user_occupation_label': <tf.Tensor: shape=(), dtype=int64, numpy=4>, 'user_occupation_text': <tf.Tensor: shape=(), dtype=string, numpy=b'healthcare'>, 'user_rating': <tf.Tensor: shape=(), dtype=float32, numpy=4.0>, 'user_zip_code': <tf.Tensor: shape=(), dtype=string, numpy=b'06472'>}
{'bucketized_user_age': <tf.Tensor: shape=(), dtype=float32, numpy=50.0>, 'movie_genres': <tf.Tensor: shape=(2,), dtype=int64, numpy=array([10, 16])>, 'movie_id': <tf.Tensor: shape=(), dtype=string, numpy=b'895'>, 'movie_title': <tf.Tensor: shape=(), dtype=string, numpy=b'Scream 2 (1997)'>, 'raw_user_age': <tf.Tensor: shape=(), dtype=float32, numpy=55.0>, 'timestamp': <tf.Tensor: shape=(), dtype=int64, numpy=891409199>, 'user_gender': <tf.Tensor: shape=(), dtype=bool, numpy=True>, 'user_id': <tf.Tensor: shape=(), dtype=string, numpy=b'197'>, 'user_occupation_label': <tf.Tensor: shape=(), dtype=int64, numpy=18>, 'user_occupation_text': <tf.Tensor: shape=(), dtype=string, numpy=b'technician'>, 'user_rating': <tf.Tensor: shape=(), dtype=float32, numpy=3.0>, 'user_zip_code': <tf.Tensor: shape=(), dtype=string, numpy=b'75094'>}

```

To view the specific column data you have to pass the column name,

```auto
for data in ratings.take(5):
  print(data['movie_title'])
#output
tf.Tensor(b"One Flew Over the Cuckoo's Nest (1975)", shape=(), dtype=string)
tf.Tensor(b'Strictly Ballroom (1992)', shape=(), dtype=string)
tf.Tensor(b'Very Brady Sequel, A (1996)', shape=(), dtype=string)
tf.Tensor(b'Pulp Fiction (1994)', shape=(), dtype=string)
tf.Tensor(b'Scream 2 (1997)', shape=(), dtype=string)

```

To get the exact values you can use .numpy method

```auto
for data in ratings.take(5):
  print(data['movie_title'].numpy())
#output
b"One Flew Over the Cuckoo's Nest (1975)"
b'Strictly Ballroom (1992)'
b'Very Brady Sequel, A (1996)'
b'Pulp Fiction (1994)'
b'Scream 2 (1997)'

```

Thank You.
