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 | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file special_snowflake-0.0.9.tar.gz
.
File metadata
- Download URL: special_snowflake-0.0.9.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1ceff7397502b6269a429fc6560357541f8bf3cf910e345859f5d0d3a535935 |
|
MD5 | 51b8228be2a2316c82ea7c2979ca1684 |
|
BLAKE2b-256 | 2bcce9f2f6e593fb4fdae7d05dda78866f33ddba648473a84535b6952ec89629 |