skka3134

skka3134

email
telegram

3. 統計分析

  1. Data reading, specifying time as the index, and converting time to standard format
import pandas as pd
data=pd.read_csv('data.csv',index_col=0,parse_dates=True)

Analysis of sequence changes

  1. View the interpolation of the previous day
data.diff()
  1. Average difference
data.diff().mean()
  1. Growth rate
data.pct_change().round(3)
  1. Average growth rate
data.pct_change().mean()

Time series resampling

  1. Weekly basis
data.resample('1w').last()
  1. Weekly basis, specifying labels
data.resample('1w',label='left').last()
  1. Time window

Short-term average calculation

読み込み中...
文章は、創作者によって署名され、ブロックチェーンに安全に保存されています。