Skip to main content

Find the unique indices for a dataset

Project description

Because datasets are often provided with scant metadata, I want to infer some of the conventional metadata without depending on special information. One such sort of metadata is the schema of the dataset.

Special snowflake looks for unique identifiers in arbitrary datasets. Run it like so.

$ snowflake bus_stops.csv
route.number, stop.id, n.students
time, n.students, location
route.name, n.students, location
route.name, stop.id
route.number, stop.id, time

By default, you get all of the combinations of up to three columns inside bus_stops.csv that function as unique indices on the full spreadsheet.

Or call it from Python!

from special_snowflake import fromcsv
from pprint import pprint
with open('open-data-index.csv') as fp:
    pprint(fromcsv(csv.DictReader(fp), n_columns = 2, only_adjacent = False))

This program finds all of the combinations of one or two columns inside open-data-index.csv that function as unique indices on the full spreadsheet.

Project details


Download files

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

Source Distribution

special_snowflake-0.0.9.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file special_snowflake-0.0.9.tar.gz.

File metadata

File hashes

Hashes for special_snowflake-0.0.9.tar.gz
Algorithm Hash digest
SHA256 c1ceff7397502b6269a429fc6560357541f8bf3cf910e345859f5d0d3a535935
MD5 51b8228be2a2316c82ea7c2979ca1684
BLAKE2b-256 2bcce9f2f6e593fb4fdae7d05dda78866f33ddba648473a84535b6952ec89629

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page