Skip to content

Example A not reproducible #25

Description

@cklat

Hi!

I'm trying to replicate the examples that are illustrated in the readme but however I'm not able to replicate them.

I tried to convert the example_a.csv with the following code snippet:

import hone

optional_arguments = {
  "delimiters": [" ", ",", ";"]
}
Hone = hone.Hone(**optional_arguments)
schema = Hone.get_schema('./example_a.csv')

and the expected output should be:

[
  {
    "adopted": "TRUE",
    "adopted_since": "2012",
    "age (years)": "5",
    "birth": {
      "day": "11",
      "month": "April",
      "year": "2011"
    },
    "name": "Tommy",
    "weight (kg)": "3.6"
  },
  {
    "adopted": "FALSE",
    "adopted_since": "N/A",
    "age (years)": "2",
    "birth": {
      "day": "6",
      "month": "May",
      "year": "2015"
    },
    "name": "Clara",
    "weight (kg)": "8.2"
  },
  {
    "adopted": "TRUE",
    "adopted_since": "2017",
    "age (years)": "6",
    "birth": {
      "day": "21",
      "month": "August",
      "year": "2011"
    },
    "name": "Catnip",
    "weight (kg)": "3.3"
  },
  {
    "adopted": "TRUE",
    "adopted_since": "2018",
    "age (years)": "3",
    "birth": {
      "day": "18",
      "month": "January",
      "year": "2015"
    },
    "name": "Ciel",
    "weight (kg)": "3.1"
  }
]

but what I get is the following:

{'adopted_since': 'adopted_since',
 'adopted': 'adopted',
 'birth': {'year': 'birth year', 'month': 'birth month', 'day': 'birth day'},
 'weight (kg)': 'weight (kg)',
 'age (years)': 'age (years)',
 'name': 'name'}

so basically the cell values are not inserted in the dictionary.

Anything I did wrong or missed in the code snippet?

Thanks for the help!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions