08 2020 档案
摘要:python--data.dropna 读取csv文件 data=pd.read_csv(“”) 1、删除全为空值的行或列 data=data.dropna(axis=0,how='all') #行 data=data.dropna(axis=1,how='all') #列 2、删除含有空值的行或列
阅读全文
摘要:出现:statsmodels.tools.sm_exceptions.MissingDataError: exog contains inf or nans 只需要把数据中的inf或者nan变成0即可,复制下面代码: import statsmodels.api as smdata[np.isnan
阅读全文
摘要:如下所示: import time 首先导入时间模块 在程序开始执行的地方写入: start=time.clock() 在程序末尾写入: end=time.clock() 打印出运行时间: print("final is in ",end-start)
阅读全文
摘要:https://www.cnblogs.com/rix-yb/p/9919787.html 时间序列分析 一、 概念 时间序列(Time Series) 时间序列是指同一统计指标的数值按其发生的时间先后顺序排列而成的数列(是均匀时间间隔上的观测值序列)。 时间序列分析的主要目的是根据已有的历史数据对
阅读全文
摘要:https://www.zhangshengrong.com/p/281omE7rNw/ 有时候我们的数据是按某个频率收集的,比如每日、每月、每15分钟,那么我们怎么产生对应频率的索引呢?pandas中的date_range可用于生成指定长度的DatetimeIndex。 我们先看一下怎么生成日期范
阅读全文
摘要:加入以下代码即可:import matplotlibmatplotlib.rc("font",family='YouYuan')转自https://zhuanlan.zhihu.com/p/104081310?utm_source=wechat_timeline 在很长一段时间里用Python绘图,
阅读全文
摘要:https://www.cnblogs.com/harrylyx/p/11852149.html [译]如何使用Python构建指数平滑模型:Simple Exponential Smoothing, Holt, and Holt-Winters 原文连接:How to Build Exponent
阅读全文