hone
hone copied to clipboard
When we pass schema as a json, getting the error
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