使用pandas简单写Excel

1. 环境准备 我使用的是在Win10下,需要安装几个依赖包: pip install xlrd pip install pandas pip install openpyxl 如果需要用到数据库读写模块,则需要安装Mysql-Python模块: (https://download.lfd.uci.edu/pythonlibs/t7epjj8p/MySQL_python-1.2.5-cp27-none-win32.whl "Win32位下载") 2.上代码 代码完成的主要功能是从数据库读取BUG列表数据,同时写入数据库 import pandas as pd title = list() resolveBy = list() resolution = list() openedDate = list() assignedDate = list() resolvedDate = list() closeDate = list() ## 从数据库中读取数据分别对列表赋值 data = pd.read_excel('1.xlsx', sheet_name='Sheet1') print '标题||解决人||处理结果||创建日期||分配日期||解决日期||关闭日期' data = title data = resolveBy data = resolution data = openedDate data = assignedDate data = resolvedDate data = closeDate data.to_excel('1.xlsx', sheet_name='Sheet1', index=False, header=True)
阅读全文

linode推荐码

点击如下链接: https://www.linode.com/?r=eb52ebaac730f32628767cd0e732b10c04b97fe2
阅读全文

Linux中如何查看网卡属于哪个驱动

首先要确定自己的网卡型号,可以通过以下三步实现: 1、查看自己网卡的型号 下面以Realtek的网卡驱动为例进行说明 $ /sbin/lspci | grep -i Ethernet 04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01) $ /sbin/lspci -n | grep '04:00.0' 04:00.0 0200: 10ec:8168 (rev 01) Searching for the vendor:device ID pairing of 10ec:8168 shows that kmod-r8168 should work with this Ethernet controller. 2、查看你的硬件对应的需要什么样的驱动: http://elrepo.org/tiki/DeviceIDs 3、对应的硬件驱动下载点: http://elrepo.org/linux/elrepo/el5/i386/RPMS/(此处为RPM包的网卡模块)
阅读全文

Ubuntu Fireware BUG [Solved]

问题: 某次打开ubuntu系统想干点活时,如果出现如下错误提示: : TSC_DEADLINE disabled due to Errata: please update microcode to version: 0x22 (or later) 解决: sudo apt-get update sudo apt-get install intel-microcode
阅读全文