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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

outkast-2.0.1.tar.gz (675.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

outkast-2.0.1-py3-none-any.whl (673.0 kB view details)

Uploaded Python 3

File details

Details for the file outkast-2.0.1.tar.gz.

File metadata

  • Download URL: outkast-2.0.1.tar.gz
  • Upload date:
  • Size: 675.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for outkast-2.0.1.tar.gz
Algorithm Hash digest
SHA256 89e7092ac2e901fa86b05169fc937d132b9d550162fab8cc9abe557fa9673f40
MD5 17b6ec3858402f4cddadd6e6df78fbfc
BLAKE2b-256 e42e0fb10fc53184e1d9497e0985f0f7473bc2f4b5bb8fcee52ddd4eb3eb9223

See more details on using hashes here.

Provenance

The following attestation bundles were made for outkast-2.0.1.tar.gz:

Publisher: release.yml on appeler/outkast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file outkast-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: outkast-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 673.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for outkast-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5a3e8fd92c563a2aa29cc7003083dce3bbf8618cc5bbaeefdeba3550219fe8d4
MD5 658a9771d8ffd58fd0d6528dd315d47e
BLAKE2b-256 86e5e93b2092923234c74caa722288f0ec4821673157287fb31b936be0926358

See more details on using hashes here.

Provenance

The following attestation bundles were made for outkast-2.0.1-py3-none-any.whl:

Publisher: release.yml on appeler/outkast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 files

1.0.0

2 files

0.2.1

2 files

0.1.0

2 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