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


Release history Release notifications

History Node

0.0.9

This version
History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
special_snowflake-0.0.8.tar.gz (2.5 kB) Copy SHA256 hash SHA256 Source None May 17, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page