These are chat archives for frictionlessdata/chat

9th
Sep 2018
Zane Selvans
@zaneselvans
Sep 09 2018 18:20 UTC
What on earth am I doing wrong here? After adding a new key:value pair to the descriptor of a field in a table schema and committing it, accessing what I thought would be the same thing in two ways yields different results, and the updated descriptor does not appear in the saved output tableschema.json:
mines_table.schema.get_field('STATE').descriptor.update({'description': 'State abbreviation.'})
mines_table.schema.commit()
pprint(mines_table.schema.descriptor['fields'][10], width=160)
pprint(mines_table.schema.get_field('STATE').descriptor, width=160)
Gives me:
{'format': 'default', 'name': 'STATE', 'type': 'string'}
{'description': 'State abbreviation.', 'format': 'default', 'name': 'STATE', 'type': 'string'}