

def update(self, data):
    'Set the value of user fields. The field types will be the same.\n\n        data ... dict, with field name as key, field value as value\n\n        Returns None\n\n        '
    self.loaddoc()
    all_fields = self.document.getElementsByType(UserFieldDecl)
    for f in all_fields:
        field_name = f.getAttribute('name')
        if (field_name in data):
            value_type = f.getAttribute('valuetype')
            value = data.get(field_name)
            if (value_type == 'string'):
                f.setAttribute('stringvalue', value)
            else:
                f.setAttribute('value', value)
    self.savedoc()

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/userfield.py UserFields.update/original