title: advise for debugging `tf.data.Dataset` operations in tensorflow 2.0
body: <p><strong>What is the equivalent of Panda's <code>df.head()</code> for tf datasets?</strong></p>
  
  <p>Following the documentation <a href="https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/data/Dataset" rel="noreferrer">here</a> I've constructed the following toy examples:</p>
  
  <pre class="lang-py prettyprint-override"><code>dset = tf.data.Dataset.from_tensor_slices((tf.constant([1.,2.,3.]), tf.constant([4.,4.,4.]), tf.constant([5.,6.,7.])))
  print(dset)
  </code></pre>
  
  <p>outputs </p>
  
  <pre><code>&lt;TensorSliceDataset shapes: ((), (), ()), types: (tf.float32, tf.float32, tf.float32)&gt;
  </code></pre>
  
  <p><strong>I would prefer to get back something resembling a tensor</strong>, so to get some values I'll make an iterator.</p>
  
  <pre class="lang-py prettyprint-override"><code>dset_iter = dset.__iter__()
  print(dset_iter.next())
  </code></pre>
  
  <p>outputs</p>
  
  <pre class="lang-py prettyprint-override"><code>(&lt;tf.Tensor: id=122, shape=(), dtype=float32, numpy=1.0&gt;,
   &lt;tf.Tensor: id=123, shape=(), dtype=float32, numpy=4.0&gt;,
   &lt;tf.Tensor: id=124, shape=(), dtype=float32, numpy=5.0&gt;)
  </code></pre>
  
  <p>So far so good.  Let's try some windowing...</p>
  
  <pre class="lang-py prettyprint-override"><code>windowed = dset.window(2)
  print(windowed)
  </code></pre>
  
  <p>outputs</p>
  
  <pre class="lang-py prettyprint-override"><code>&lt;WindowDataset shapes: (&lt;tensorflow.python.data.ops.dataset_ops.DatasetStructure object at 0x1349b25c0&gt;, &lt;tensorflow.python.data.ops.dataset_ops.DatasetStructure object at 0x1349b27b8&gt;, &lt;tensorflow.python.data.ops.dataset_ops.DatasetStructure object at 0x1349b29b0&gt;), types: (&lt;tensorflow.python.data.ops.dataset_ops.DatasetStructure object at 0x1349b25c0&gt;, &lt;tensorflow.python.data.ops.dataset_ops.DatasetStructure object at 0x1349b27b8&gt;, &lt;tensorflow.python.data.ops.dataset_ops.DatasetStructure object at 0x1349b29b0&gt;)&gt;
  </code></pre>
  
  <p>Ok, use the iterator trick again:</p>
  
  <pre class="lang-py prettyprint-override"><code>windowed_iter = windowed.__iter__()
  windowed_iter.next()
  </code></pre>
  
  <p>outputs</p>
  
  <pre class="lang-py prettyprint-override"><code>(&lt;_VariantDataset shapes: (), types: tf.float32&gt;,
   &lt;_VariantDataset shapes: (), types: tf.float32&gt;,
   &lt;_VariantDataset shapes: (), types: tf.float32&gt;)
  </code></pre>
  
  <p>What?  A <code>WindowDataset</code>'s iterator gives back a <em>tuple</em> of other dataset objects?<br>
  I would expect the first item in this WindowDataset to be the tensor with values [[1.,4.,5.],[2.,4.,6.]].  Maybe this is still true, but it isn't readily apparent to me from this 3-tuple of datasets.
  Ok.  Let's get <em>their</em> iterators...</p>
  
  <pre class="lang-py prettyprint-override"><code>vd = windowed_iter.get_next()
  vd0, vd1, vd2 = vd[0], vd[1], vd[2]
  vd0i, vd1i, vd2i = vd0.__iter__(), vd1.__iter__(), vd2.__iter__()
  print(vd0i.next(), vd1i.next(), vd2i.next())
  </code></pre>
  
  <p>outputs</p>
  
  <pre class="lang-py prettyprint-override"><code>(&lt;tf.Tensor: id=357, shape=(), dtype=float32, numpy=1.0&gt;,
   &lt;tf.Tensor: id=358, shape=(), dtype=float32, numpy=4.0&gt;,
   &lt;tf.Tensor: id=359, shape=(), dtype=float32, numpy=5.0&gt;)
  </code></pre>
  
  <p>As you can see, this workflow is quickly becoming a mess.  I like how Tf2.0 is attempting to make the framework more interactive and pythonic.  Are there good examples of the datasets api conforming to this vision too?</p>