---
title: Dataset and IterableDataset differ in access and evaluation
slug: hf-datasets-map-style-vs-iterable
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source: https://iinventedlight.com/library/notes/hf-datasets-map-style-vs-iterable.md
source_license: Apache-2.0
attribution: Original synthesis by iinventedlight, drafted by Librarian with AI assistance; based on the attributed sources
  below.
author: Librarian
client: Librarian
date: '2026-11-05'
checked_on: '2026-11-05'
as_of: '2026-11-05'
status: published
confidence: medium
category: coding-references
tags:
- hf
- datasets
- map
untested: Reference note. No code or commands were run to validate behavior.
sources:
- id: S1
  title: Differences between Dataset and IterableDataset
  publisher: Hugging Face contributors
  url: https://raw.githubusercontent.com/huggingface/datasets/main/docs/source/about_mapstyle_vs_iterable.mdx
  accessed: '2026-11-05'
  license: Apache-2.0
  license_url: https://raw.githubusercontent.com/huggingface/datasets/main/LICENSE
  license_verified: '2026-11-05'
  green: true
  attribution: Hugging Face contributors; Differences between Dataset and IterableDataset; Apache-2.0
  snapshot: _fetched/hf-types.txt
- id: S2
  title: Stream
  publisher: Hugging Face contributors
  url: https://raw.githubusercontent.com/huggingface/datasets/main/docs/source/stream.mdx
  accessed: '2026-11-05'
  license: Apache-2.0
  license_url: https://raw.githubusercontent.com/huggingface/datasets/main/LICENSE
  license_verified: '2026-11-05'
  green: true
  attribution: Hugging Face contributors; Stream; Apache-2.0
  snapshot: _fetched/hf-stream.txt
---
# Dataset and IterableDataset differ in access and evaluation

## Summary
A regular `Dataset` provides random row access. An `IterableDataset` produces examples through iteration, which suits progressive reads rather than arbitrary row lookup. [S1, S2]

## Details
Loading with `streaming=True` returns an `IterableDataset`. Streaming reads records as iteration advances, avoiding a full initial download of the remote dataset. It does not make the last record directly addressable: reaching it requires visiting earlier records. The choice therefore depends on the access pattern as well as available storage. [S1, S2]

## Claims
- id: C1
  claim: "A regular Dataset supports random access to rows."
  source: S1
  evidence: "This provides random access to the rows"
- id: C2
  claim: "Streaming load creates an IterableDataset."
  source: S2
  evidence: "known as an [`IterableDataset`]"
- id: C3
  claim: "Reading the last iterable example requires traversing earlier examples."
  source: S2
  evidence: "iterate over all the previous examples"

## Sources
- [S1] Differences between Dataset and IterableDataset. Hugging Face contributors. https://raw.githubusercontent.com/huggingface/datasets/main/docs/source/about_mapstyle_vs_iterable.mdx. Apache-2.0; license: https://raw.githubusercontent.com/huggingface/datasets/main/LICENSE. Accessed 2026-11-05.
- [S2] Stream. Hugging Face contributors. https://raw.githubusercontent.com/huggingface/datasets/main/docs/source/stream.mdx. Apache-2.0; license: https://raw.githubusercontent.com/huggingface/datasets/main/LICENSE. Accessed 2026-11-05.

## Attribution and notices
This note is CC BY 4.0. Source material has been condensed and restated; short evidence excerpts retain their source license.

Hugging Face Datasets documentation is Apache-2.0. This note restates the documentation and includes only short evidence excerpts. See the accompanying source license.
