From 035a11a6da5e0f85e64dc07f740d5a3ec1cf9786 Mon Sep 17 00:00:00 2001 From: Robin Linderborg Date: Fri, 25 Jan 2019 14:40:27 +0100 Subject: [PATCH] Link to docs in README --- README.md | 54 +----------------------------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/README.md b/README.md index e21c47e..2bbc7da 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,4 @@ Frame2Package ============= -A helper library for converting Pandas dataframes to DDF packages. - -## Usage - -```python -import pandas as pd -import io -from frame2package import Frame2Package - -# Load some sample data - -data = """area year age education distribution -Bahamas 2000 15+ Total 1.0 -Fiji 1970 80+ Total 1.0 -Gabon 2025 20--64 Under 15 0.0 -Brunei Darussalam 2045 All Total 1.0 -Thailand 1985 15+ Upper Secondary 0.07 -""" - -df = pd.read_csv(io.StringIO(data), sep='\t') - -# Specify all the concepts in the dataset -# as per the DDF data format specification. - -concepts = [ - { - 'concept': 'area', - 'concept_type': 'entity_domain' - }, - { - 'concept': 'year', - 'concept_type': 'time' - }, - { - 'concept': 'age', - 'concept_type': 'string' - }, - { - 'concept': 'education', - 'concept_type': 'entity_domain' - }, - { - 'concept': 'distribution', - 'concept_type': 'measure' - }, -] - -# Initialize a Frame2Package object -f2p = Frame2Package(data=df, concepts=concepts) - -# Save the package -f2p.to_package('sample-dataset') -``` \ No newline at end of file +A helper library for converting Pandas dataframes to DDF packages: [frame2package.readthedocs.io](https://frame2package.readthedocs.io). \ No newline at end of file