摘要: 需求:把以下字符串转换为字典 转换为:testDic = { "pName": "Ceshi", "gender": 1, "country": 156, "countryType": 1, "nation": 1, "province": "北京市" } 方法1:通过 json 转换 缺点:jso 阅读全文
posted @ 2019-01-25 12:05 BelleLs 阅读(2538) 评论(0) 推荐(0)
摘要: #导入相关模块 from xlrd import open_workbook #打开excel file = open_workbook("test.xlsx") #获取sheet:1按名称获取;2通过索引顺序获取 3 通过索引顺序获取 sheet = file.sheet_by_name("sheetname") sheet = file.sheet_by_index(0) sheet =... 阅读全文
posted @ 2019-01-25 11:00 BelleLs 阅读(268) 评论(0) 推荐(0)