随笔分类 - python小程序
摘要:def read_head_xls(file,nrow): ''' 读取nrow行excel数据,并计算耗时 用于读取测试数据 依赖于 from time import time from xlrd import open_workbook from pandas import DataFrame
阅读全文
摘要:def summary(dat): ''' 求一个df的列名、每列数据类型、每列非空行数、每列缺失比例、每列取值个数 用于了解原始数据情况 *依赖于 singe_df() from pandas import concat ''' dat_head = singe_df(dat.columns,'c
阅读全文
摘要:留存备份。 简单背景:因为想要计算连续高温天数又恰好想用python所以试了试 居然能行而且快 数据说明: 数据集名称 data 行为日期,按升序排列 第3列为当日最高气温 第8列为需要计算的连续高温天数 理论上高温是指35度以上 因为地理原因调整为30度 前10行的连续高温天数我自己打上去了 嫌麻
阅读全文

浙公网安备 33010602011771号