Skip to content

When we pass schema as a json, getting the error #31

@prabha1331

Description

@prabha1331

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

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