码迷,mamicode.com
首页 >  
搜索关键字:xlsx    ( 1097个结果
Python操作excel之xlrd和xlwt简介
xlrd和xlwt 安装代码 pip3 install xlrd pip3 install xlwt xlrd 打开文件 xlrd.open_workbook(filename=None, logfile=<_io.TextIOWrapper name='<stdout>' mode='w' enc ...
分类:编程语言   时间:2020-06-15 14:22:06    阅读次数:65
求长方形的外接圆
import pandas import numpy def get_circle_area(l,h): r=numpy.sqrt(l**2+h**2)/2 return r**2*numpy.pi excel=pandas.read_excel('长方形.xlsx',index_col='id') ...
分类:其他好文   时间:2020-06-15 11:45:52    阅读次数:66
对excel行的操作
import pandas sheet1=pandas.read_excel('成绩.xlsx',sheet_name='Sheet1') sheet2=pandas.read_excel('成绩.xlsx',sheet_name='Sheet2') 连接两张表 students=sheet1.ap ...
分类:其他好文   时间:2020-06-14 18:26:30    阅读次数:48
数据预测,制做线性回归方程
1 import pandas 2 from matplotlib import pyplot 3 from scipy.stats import linregress 4 sale=pandas.read_excel('销售.xlsx',dtype={'date':str}) 5 6 7 slop ...
分类:其他好文   时间:2020-06-14 12:37:02    阅读次数:59
Ajax 下载文件 文件被损坏
问题表现 Ajax 下载文件成功后,打开提示格式损坏,源代码如下: axios({ method: 'get', url: "/public/工作簿1.xlsx", // 静态资源地址 }).then(res => { const href = document.querySelector('.h ...
分类:Web程序   时间:2020-06-14 10:52:02    阅读次数:76
定位和删除重复
1 import pandas 2 excel=pandas.read_excel('成绩.xlsx',sheet_name='Sheet1') 3 #excel.drop_duplicates(subset='name',inplace=True,keep='last') #keep默认为Firs ...
分类:其他好文   时间:2020-06-13 13:21:01    阅读次数:57
旋转数据表
1 import pandas 2 pandas.options.display.max_columns=20 #显示所有的列名 3 excel=pandas.read_excel('成绩.xlsx',index_col='id') 4 table=excel.transpose() #旋转表 5 ...
分类:其他好文   时间:2020-06-13 13:03:48    阅读次数:74
求和,求平均数
1 import pandas 2 excel=pandas.read_excel(r'F:\pandas练习\成绩.xlsx',index_col='id',sheet_name='Sheet1') 3 temp=excel[['score1','score2']] 4 5 row_sum=tem ...
分类:其他好文   时间:2020-06-12 14:30:37    阅读次数:47
上传file时accept限制文件类型pdf、doc、docx、 jpg、 png、xls 、xlsx等格式
<input type="file" accept="image/*" /> audio/* 接受所有的声音文件。 video/* 接受所有的视频文件。 image/* 接受所有的图像文件。 MIME_type 一个有效的 MIME 类型,不带参数。请参阅 IANA MIME 类型,获得标准 MIM ...
分类:Web程序   时间:2020-06-11 19:30:20    阅读次数:270
poi处理excel的合并单元格写的工具类,支持xlsx和xls
1.判断当前单元格是不是合并单元格 1 ... 2 private boolean isMergedRegion(Sheet sheet, int row, int column) { 3 //获取合并单元格的数量 4 int sheetMergeCount = sheet.getNumMerged ...
分类:其他好文   时间:2020-06-09 20:38:19    阅读次数:61
1097条   上一页 1 ... 8 9 10 11 12 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!