hone icon indicating copy to clipboard operation
hone copied to clipboard

When we pass schema as a json, getting the error

Open prabha1331 opened this issue 4 years ago • 0 comments

I am trying to use the this library for converting csv to nested json. I am getting the below error "line 39, in populate_structure_with_data key_path = mapping[column_name] KeyError: 'studentid'" when i try the script with example_a.csv its working good. i am not sure about whats going on

below is my code

import hone

optional_arguments = {
  "delimiters": [","]
}
Hone = hone.Hone(**optional_arguments)
schema = Hone.get_schema('csvschema.json')  # nested JSON schema for input.csv
result = Hone.convert('data.csv', schema=schema)  # final structure, nested according to schema

prabha1331 avatar May 16 '21 14:05 prabha1331