数据处理
文章平均质量分 70
匹诺曹的鲸
这个作者很懒,什么都没留下…
展开
-
Python 离线安装 Extension Packages
Package 下载网址:Christoph GohIke:https://www.lfd.uci.edu/~gohlke/pythonlibs/PyPI:PyPI · The Python Package Index查看当前python的适配文件版本:pip debug --verbose进入下载文件所在目录,安装Package:pip install numpy-1.21.4+mkl-cp39-cp39-win_amd64.whl时有Warning:Connection to pyp原创 2021-11-11 16:23:24 · 2982 阅读 · 0 评论 -
Python Pandas DataFrame
import pandas as pd一、创建DataFrame1. 新建DataFramedf = pd.DataFrame(data = [['Sisyphus', 'male', 'D'], ['Athena', 'female', 'B'], ['Zeus', 'male', 'A'], ['Hera', 'female', 'C.原创 2021-11-09 11:44:49 · 847 阅读 · 0 评论 -
批量转换CSV-XLSX / 批量合并XLSX
在王晓磊的个人网站里下载了近几年的全国空气质量数据规格是每年365天每天一个csv文件,想整合到一个excel工作表中,先将其批量转换成xlsx文件。import pandasimport osfor y in range(2016, 2021): for csv_name in os.listdir(r'\城市_{0}0101-{0}1231'.format(y)): # os读取文件名 csv = pandas.read_csv(r'\城市_{0}0101-原创 2021-05-19 13:55:41 · 754 阅读 · 0 评论 -
Python xlrd
一、xlrd模块介绍xlrd是读取excel表格数据; 支持 xlsx和xls 格式的excel表格; 三方模块安装方式:pip3 install xlrd; 模块导入方式: import xlrd二、xlrd模块操作1. 基本函数1.1. 打开workbook获取Book对象xlrd.open_workbook(filename[, logfile, file_contents, ...]):打开excel文件 filename:需操作的文件名(包括文件路径和文件名称);若fi转载 2021-02-24 10:13:22 · 824 阅读 · 0 评论