Skip to main content
https://github.com/appeler/outkast/actions/workflows/ci.yml/badge.svg https://img.shields.io/pypi/v/outkast.svg https://img.shields.io/badge/docs-github.io-blue

Outkast returns descriptive counts and proportions for surname groups in a filtered extract of India’s 2011 Socio-Economic and Caste Census (SECC). It is a deterministic table lookup, not a classifier. A match describes a group in the reference data. It does not identify or estimate an individual’s caste.

Safety and scope

Do not use Outkast to label people, make decisions about people, or fill a missing sensitive attribute. A surname may be shared across castes, regions, languages, and religions. Group proportions cannot establish any individual’s membership. The reference data and historical preprocessing may contain coverage, recording, and selection errors.

The package releases only state, birth year, and surname cells with at least 100 reference records. It does not release national, state-only, or birth-year-only counts. A user therefore cannot recover a suppressed detailed cell by subtracting released children from a released parent total. All rows in the artifact have the same fixed granularity. This guarantee applies to current distribution artifacts. It cannot revoke data from repository history or older package releases.

Cell retention is low by design because the removed cells are small. Support retention measures the share of about 93.4 million reference records represented by released state, birth year, and surname cells. At the minimum support of 100, the artifact retains 83.45% of record support and 7.51% of source cells. These figures measure artifact coverage, not coverage of India’s population or of new input names. The manifest rounds coverage ratios to four decimal places and does not release the exact source or suppressed support totals.

The threshold sensitivity below reports support retention, not cell retention. A floor of 100 suppresses 92.49% of source cells. A floor of 200 would lower support retention below 80%.

Minimum

Support retained

Cells retained

20

95.22%

25.99%

50

89.53%

13.53%

100

83.45%

7.51%

200

76.44%

4.03%

The package exposes observed counts and proportions. It does not report multinomial intervals. Such intervals would describe sampling variation under a sampling model, but would not capture SECC coverage error, preprocessing error, or the uncertainty in applying a group aggregate to a person.

Installation

Install Outkast in a virtual environment:

pip install outkast

Python API

lookup_secc_caste_composition preserves the input row count, order, and index. It raises on missing or duplicate input columns and on result-column collisions. Every call requires both state and birth_year because the package does not distribute broader aggregates.

import pandas as pd
from outkast import lookup_secc_caste_composition

people = pd.DataFrame({"surname": ["patel", "lal", None, "notintable"]})
result = lookup_secc_caste_composition(
    people,
    "surname",
    state="bihar",
    birth_year=1949,
)

list_supported_states returns the states the table covers, and get_secc_data_manifest returns the manifest described below. Both are useful before a lookup, because a state or birth year outside the shipped universe abstains the whole frame with unsupported_context.

The appended fields are:

  • secc_count_sc, secc_count_st, and secc_count_other

  • secc_total_support

  • secc_proportion_sc, secc_proportion_st, and secc_proportion_other

  • secc_lookup_status, either matched or abstained

  • secc_abstention_reason

An abstention reason is one of missing_name, unsupported_script, out_of_vocabulary, unsupported_context, or insufficient_support. Outkast matches only ASCII alphabetic surnames because the historical source pipeline retained that script and format. It does not transliterate names.

Command line

outkast-secc-lookup input.csv \
    --surname-column surname \
    --state bihar \
    --birth-year 1949 \
    --output result.csv

Data and artifact integrity

The typed Parquet runtime table contains one fixed-granularity hierarchy. The package verifies the table and immutable JSON manifest by SHA-256 before the first lookup. The manifest records the schema, hashes, release design, provenance, reference population, supported states and years, coverage, and a count-free surname vocabulary. That vocabulary distinguishes names absent from the source from contextual cells withheld for insufficient support.

The source is the parsed SECC 2011 dataset. The source distribution includes data/secc/build_runtime_table.py. Run it with the historical source artifact to reproduce the packaged table and manifest. The source CSV itself is not included.

License

Outkast is released under the MIT License.

Release files for outkast 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for outkast 2.0.1
File Size Uploaded
outkast-2.0.1.tar.gz 675.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for outkast 2.0.1
File Interpreter ABI Platform
outkast-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / outkast-2.0.1.tar.gz

Download URL outkast-2.0.1.tar.gz
Size 675.2 kB
Tags Source
SHA-256 checksum
How to use checksums
89e7092ac2e901fa86b05169fc937d132b9d550162fab8cc9abe557fa9673f40
BLAKE2b-256 checksum
How to use checksums
e42e0fb10fc53184e1d9497e0985f0f7473bc2f4b5bb8fcee52ddd4eb3eb9223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / outkast-2.0.1-py3-none-any.whl

Download URL outkast-2.0.1-py3-none-any.whl
Size 673.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a3e8fd92c563a2aa29cc7003083dce3bbf8618cc5bbaeefdeba3550219fe8d4
BLAKE2b-256 checksum
How to use checksums
86e5e93b2092923234c74caa722288f0ec4821673157287fb31b936be0926358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

1.0.0

2 release files

0.2.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page