class_docstr: An iterator for reading records from a :class:`~Dataset`.
  
  For Datasets, each iteration call represents a complete read of all items in the
  Dataset.
  
  If using Ray Train, each trainer actor should get its own iterator by calling
  :meth:`ray.train.get_dataset_shard("train")
  <ray.train.get_dataset_shard>`.
  
  Examples:
      >>> import ray
      >>> ds = ray.data.range(5)
      >>> ds
      Dataset(num_blocks=..., num_rows=5, schema={id: int64})
      >>> ds.iterator()
      DataIterator(Dataset(num_blocks=..., num_rows=5, schema={id: int64}))
class_docstr_tok: ["An","iterator","for","reading","records","from","a",":","class",":","`","~Dataset","`",".","For","Datasets",",","each","iteration","call","represents","a","complete","read","of","all","items","in","the","Dataset",".","If","using","Ray","Train",",","each","trainer","actor","should","get","its","own","iterator","by","calling",":","meth",":","`","ray.train.get_dataset_shard","(","``","train","''",")","<","ray.train.get_dataset_shard",">","`",".","Examples",":",">",">",">","import","ray",">",">",">","ds","=","ray.data.range","(","5",")",">",">",">","ds","Dataset","(","num_blocks=","...",",","num_rows=5",",","schema=","{","id",":","int64","}",")",">",">",">","ds.iterator","(",")","DataIterator","(","Dataset","(","num_blocks=","...",",","num_rows=5",",","schema=","{","id",":","int64","}",")",")"]
docstr: Return a local row iterable over the dataset.
  
  If the dataset is a tabular dataset (Arrow/Pandas blocks), dicts
  are yielded for each row by the iterator. If the dataset is not tabular,
  the raw row is yielded.
  
  Examples:
      >>> import ray
      >>> dataset = ray.data.range(10)
      >>> next(iter(dataset.iterator().iter_rows()))
      {'id': 0}
  
  Time complexity: O(1)
  
  Args:
      prefetch_blocks: The number of blocks to prefetch ahead of the
          current block during the scan.
  
  Returns:
      An iterable over rows of the dataset.
docstr_tok: ["Return","a","local","row","iterable","over","the","dataset",".","If","the","dataset","is","a","tabular","dataset","(","Arrow\/Pandas","blocks",")",",","dicts","are","yielded","for","each","row","by","the","iterator",".","If","the","dataset","is","not","tabular",",","the","raw","row","is","yielded",".","Examples",":",">",">",">","import","ray",">",">",">","dataset","=","ray.data.range","(","10",")",">",">",">","next","(","iter","(","dataset.iterator","(",")",".iter_rows","(",")",")",")","{","'id","'",":","0","}","Time","complexity",":","O","(","1",")","Args",":","prefetch_blocks",":","The","number","of","blocks","to","prefetch","ahead","of","the","current","block","during","the","scan",".","Returns",":","An","iterable","over","rows","of","the","dataset","."]
code: def iter_rows(
      self, *, prefetch_blocks: int = 0
  ) -> Iterable[Dict[str, Any]]:
      """Return a local row iterable over the dataset.
  
      If the dataset is a tabular dataset (Arrow/Pandas blocks), dicts
      are yielded for each row by the iterator. If the dataset is not tabular,
      the raw row is yielded.
  
      Examples:
          >>> import ray
          >>> dataset = ray.data.range(10)
          >>> next(iter(dataset.iterator().iter_rows()))
          {'id': 0}
  
      Time complexity: O(1)
  
      Args:
          prefetch_blocks: The number of blocks to prefetch ahead of the
              current block during the scan.
  
      Returns:
          An iterable over rows of the dataset.
      """
      iter_batch_args = {"batch_size": None, "batch_format": None}
  
      iter_batch_args["prefetch_batches"] = prefetch_blocks
  
      batch_iterable = self.iter_batches(**iter_batch_args)
  
      def _wrapped_iterator():
          for batch in batch_iterable:
              batch = BlockAccessor.for_block(
                  BlockAccessor.batch_to_block(batch)
              )
              for row in batch.iter_rows(public_row_format=True):
                  yield row
  
      return _IterableFromIterator(_wrapped_iterator)
  
imports: import abc
  import time
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, TypeVar, Union
  import numpy
  from ray.data._internal.block_batching.iter_batches import iter_batches
  from ray.data._internal.stats import DatasetStats, StatsManager
  from ray.data.block import Block, BlockAccessor, BlockMetadata, DataBatch, _apply_strict_mode_batch_format
  from ray.types import ObjectRef
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 4 for calling the DataIterator obj's underlying member method code with example usage: obj.iter_rows() and returns: _IterableFromIterator