Last active
August 29, 2015 14:03
-
-
Save Dexus/3a40b764f5243cc6afd6 to your computer and use it in GitHub Desktop.
error json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
data = json.loads('[{"p_product":"ECON 101","p_qty":101,"p_tax":"19%","p_eprice":"123,99 \u20ac","p_gprice":"12.522,99 \u20ac"},{"p_product":"ECON 101","p_qty":101,"p_tax":"19%","p_eprice":"123,99 \u20ac","p_gprice":"12.522,99 \u20ac"},{"p_product":"ECON 101","p_qty":101,"p_tax":"19%","p_eprice":"123,99 \u20ac","p_gprice":"12.522,99 \u20ac"},{"p_product":"ECON 101","p_qty":101,"p_tax":"19%","p_eprice":"123,99 \u20ac","p_gprice":"12.522,99 \u20ac"}]') | |
document.merge_rows('p_product',**data) | |
# results in: | |
# | |
# document.merge_rows('p_product',**data) | |
#TypeError: merge_rows() argument after ** must be a mapping, not list | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.merge_rows('class_code', | |
[{'class_code': 'ECON101', 'class_name': 'Economics 101', 'class_grade': 'A'}, | |
{'class_code': 'ECONADV', 'class_name': 'Economics Advanced', 'class_grade': 'B'}, | |
{'class_code': 'OPRES', 'class_name': 'Operations Research', 'class_grade': 'A'}]) | |
# dies funktioniert! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment