Iterating rows and columns using XLRD in Python
问题 I'm using python xlrd module to parse an Excel file. Here is how the excel file looks like: Title A B C attribute 1 1 2 3 attribute 2 4 5 6 attribute 3 7 8 9 And I want the output in the following format: [ { "name": "A", "attribute1": { "value": 1 }, "attribute2": { "value": 4 }, "attribute3": { "value": 7 } }, { "name": "B", "attribute1": { "value": 2 }, "attribute2": { "value": 5 }, "attribute3": { "value": 8 } }, { "name": "C", "attribute1": { "value": 3 }, "attribute2": { "value": 6 },