Dataset Viewer
Auto-converted to Parquet Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
id: string
act_id: string
page_or_anchor: string
footnote_number: int32
raw_text: string
amendment_type: string
amending_act_citation: string
amending_year: int32
wef_date: string
to
{'id': Value('string'), 'act_id': Value('string'), 'section_number': Value('string'), 'slug': Value('string'), 'structural_unit': Value('string'), 'heading': Value('string'), 'full_text': Value('string'), 'chapter_id': Value('string'), 'chapter_name': Value('string'), 'language': Value('string')}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 544, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3052, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2559, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2584, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 558, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 440, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/parquet/parquet.py", line 220, in _generate_tables
                  yield Key(file_idx, batch_idx), self._cast_table(pa_table)
                                                  ~~~~~~~~~~~~~~~~^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/parquet/parquet.py", line 156, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              id: string
              act_id: string
              page_or_anchor: string
              footnote_number: int32
              raw_text: string
              amendment_type: string
              amending_act_citation: string
              amending_year: int32
              wef_date: string
              to
              {'id': Value('string'), 'act_id': Value('string'), 'section_number': Value('string'), 'slug': Value('string'), 'structural_unit': Value('string'), 'heading': Value('string'), 'full_text': Value('string'), 'chapter_id': Value('string'), 'chapter_name': Value('string'), 'language': Value('string')}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Open Laws India (kanoonhq/open-laws)

The complete, open-source, canonical dataset of Indian statutory legislation, maintained by KanoonHQ.

This dataset provides structured, versioned, machine-readable bare acts, sections, amendment footnotes, and criminal law transition mappings (IPC ↔ BNS, CrPC ↔ BNSS, Evidence Act ↔ BSA).

Dataset Summary

  • Total Acts: 861 Central Acts (1855–2024)
  • Total Sections/Provisions: 35,836
  • Statutory Amendment Footnotes: 28,653 (22,490 with explicit w.e.f. commencement dates)
  • Criminal Transition Mappings: 107 (IPC↔BNS, CrPC↔BNSS, IEA↔BSA)
  • License: CC0 1.0 Universal (Public Domain Dedication)

File Structure

File Format Description
indian_central_acts.parquet Apache Parquet (zstd) Metadata for all 861 Central Acts (title, act ID, enactment date, category, status).
indian_central_act_sections.parquet Apache Parquet (zstd) All 35,836 sections with clean text, chapter hierarchy, and canonical slugs.
central_act_footnotes.parquet Apache Parquet (zstd) 28,653 statutory amendment footnotes with parsed Amending Acts and w.e.f. dates.
criminal_law_mappings.parquet Apache Parquet (zstd) Transition crosswalk mapping IPC sections to BNS 2023, and CrPC to BNSS 2023.
indian_central_acts_complete.jsonl.gz Compressed JSON Lines Hierarchical complete archive (each line is an Act with nested sections and footnotes).

Quickstart Usage

1. Python (datasets library)

from datasets import load_dataset

# Load all sections
sections = load_dataset("kanoonhq/open-laws", data_files="indian_central_act_sections.parquet", split="train")
print(sections[0])

# Search for murder provision in BNS
bns_murder = sections.filter(lambda x: x["act_id"] == "A2023-45" and "murder" in (x["heading"] or "").lower())
print(bns_murder[0]["section_number"], bns_murder[0]["heading"])

2. DuckDB (Direct SQL over HTTP or local)

-- Query directly without downloading whole files
SELECT section_number, heading, full_text
FROM 'indian_central_act_sections.parquet'
WHERE act_id = 'A1860-45' AND section_number = 'Section 302.';

3. Pandas

import pandas as pd

df = pd.read_parquet("indian_central_act_sections.parquet")
print(f"Loaded {len(df)} sections across {df['act_id'].nunique()} acts.")

Legal & Copyright Status

Under Section 52(1)(q) of the Indian Copyright Act, 1957, the reproduction or publication of:

  • Any Act of a Legislature;
  • Any matter published in the Official Gazette;
  • Any judicial judgment or court order; does not constitute infringement of copyright.

The statutory text and public domain metadata are dedicated to the public domain under CC0 1.0 Universal. The packaging code and schemas are licensed under the MIT License.


Citation (BibTeX)

@dataset{kanoonhq_open_laws_2026,
  author       = {KanoonHQ Team},
  title        = {Open Laws India: Canonical Machine-Readable Indian Statutory Corpus},
  year         = {2026},
  publisher    = {Hugging Face & GitHub},
  url          = {https://github.com/kanoonhq/open-laws},
  doi          = {10.5281/zenodo.kanoonhq.open-laws}
}
Downloads last month
31