python
tskpcp
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
电话号码识别并存入excel
from excelutils import excelutil import urllibimport requests,json,xlwtfrom bs4 import BeautifulSoup,SoupStrainerif __name__=='__main__': excel_data=[] excel=excelutil.excelutil() k=-1 f=xlwt.Workbook(encoding='utf-8') sheet01=f.a原创 2020-12-10 18:10:39 · 324 阅读 · 1 评论 -
python-excel数据读取并存入mysql
#-*-coding:utf-8 -*-import osimport xlrdimport xlsxwriterimport numpy as npimport pandas as pd#from sqlalchemy import create_engine#from sqlalchemy.types import VARCHAR, Float, Integerfrom excelutils import excelutils as excelsimport pymysqlH原创 2020-12-10 18:05:40 · 377 阅读 · 0 评论 -
python-Excel读取操作
Excel操作读取文件下所有文件 def readfile(self,path):打开一个excel文件 def open_xls(self,file):获取excel中所有sheet表 def getsheet(self,f):获取sheet表的行数 def get_Allrows(self,f,sheet):读取文件内容并返回行内容 def getFile(self,file,shnum):获取sheet表的个数 def getshnum(self,f):#-*-coding:ut原创 2020-12-10 17:59:31 · 382 阅读 · 0 评论 -
python-排序算法
冒泡排序def bubble_sort(lists): if len(lists)<1: return lists for i in range(len(lists)-1,-1,-1): for j in range(i): if lists[j]<lists[j+1]: lists[j],lists[j+1]=l原创 2017-07-18 16:56:23 · 210 阅读 · 0 评论 -
python3.6爬取网易彩票并存储在dataframe中
添加引用import urllib.requestimport urllib.parseimport numpy as npimport http.cookiejarimport pandas as pdfrom bs4 import BeautifulSoupfrom pandas import DataFrame主函数def doubleChromosphereWy...原创 2018-06-11 10:25:38 · 1153 阅读 · 0 评论 -
pandas-series
创建 Series 数据类型 print('/***********从列表创建 Series*************/') arr=[0,1,2,3,4,5] s1=pd.Series(arr) print(s1) print('/***********从 Ndarray 创建 Series**********/') n=np.random.randn(...原创 2018-10-11 16:35:16 · 310 阅读 · 0 评论 -
pandas-dataframe
print('创建 DataFrame 数据类型') #DataFrame 可以存在多列数据。一般情况下,DataFrame 也更加常用。 print('/**********通过 NumPy 数组创建 DataFrame*************/') dates=pd.date_range('today',periods=6)#定义时间序列作为index num...原创 2018-10-11 16:35:32 · 247 阅读 · 0 评论
分享