2022年2月18日

python 将查询到数据,处理成包含列名和数据的字典类型数据

摘要: try: self.connect_dbserver() self.cursor.execute(sql) res = self.cursor.fetchall() # 返回的是数组的类型 print(type(res)) print(res) # 查出当前查询的列名,保存到coloums colo 阅读全文

posted @ 2022-02-18 14:48 刚刚好1 阅读(234) 评论(0) 推荐(0) 编辑

python 使用pandas修改数据到excel,报“SettingwithCopyWarning A value is trying to be set on a copy of a slice from a DataFrame”的解决方法

摘要: 场景: 通过pandas模块,将测试数据回写到excel,测试数据有写到excel文件,但控制台输出警告信息如下 警告: SettingwithCopyWarning A value is trying to be set on a copy of a slice from a DataFrame 阅读全文

posted @ 2022-02-18 10:55 刚刚好1 阅读(646) 评论(0) 推荐(0) 编辑

导航