Python 滚动函数不会打印所有值

Python 滚动函数不会打印所有值,python,pandas,Python,Pandas,我试图理解python上pandas上的滚动函数这里是我的示例代码 # importing pandas as pd import pandas as pd # By default the "date" column was in string format, # we need to convert it into date-time format # parse_dates =["date"], converts the "date" column to date-time fo

我试图理解python上pandas上的滚动函数这里是我的示例代码

# importing pandas as pd 
import pandas as pd 

# By default the "date" column was in string format, 
# we need to convert it into date-time format 
# parse_dates =["date"], converts the "date" column to date-time format 

# Resampling works with time-series data only 
# so convert "date" column to index 
# index_col ="date", makes "date" column 
df = pd.read_csv("apple.csv", parse_dates = ["date"], index_col = "date") 

print (df.close.rolling(3).sum())
print (df.close.rolling(3, win_type ='triang').sum())
cvs输入文件有255个条目,但我在输出上得到的条目很少,我得到。。。2018-10-04和2017-12-26之间。我验证了输入文件,在这两个日期之间有更多的有效条目

date
2018-11-14       NaN
2018-11-13       NaN
2018-11-12    578.63
2018-11-09    590.87
2018-11-08    607.13
2018-11-07    622.91
2018-11-06    622.21
2018-11-05    615.31
2018-11-02    612.84
2018-11-01    631.29
2018-10-31    648.56
2018-10-30    654.38
2018-10-29    644.40
2018-10-26    641.84
2018-10-25    648.34
2018-10-24    651.19
2018-10-23    657.62
2018-10-22    658.47
2018-10-19    662.69
2018-10-18    655.98
2018-10-17    656.52
2018-10-16    659.36
2018-10-15    660.70
2018-10-12    661.62
2018-10-11    653.92
2018-10-10    652.92
2018-10-09    657.68
2018-10-08    667.00
2018-10-05    674.93
2018-10-04    676.05
               ...  
2017-12-26    512.25
2017-12-22    516.18
2017-12-21    520.59
2017-12-20    524.37
2017-12-19    523.90
2017-12-18    525.31
2017-12-15    524.93
2017-12-14    522.61
2017-12-13    518.46
2017-12-12    516.19
2017-12-11    516.64
2017-12-08    513.74
2017-12-07    511.36
2017-12-06    507.70
2017-12-05    507.97
2017-12-04    508.45
2017-12-01    510.49
2017-11-30    512.70
2017-11-29    512.38
2017-11-28    514.40
2017-11-27    516.64
2017-11-24    522.13
2017-11-22    524.02
2017-11-21    523.07
2017-11-20    518.08
2017-11-17    513.27
2017-11-16    511.23
2017-11-15    510.33
2017-11-14    511.52
2017-11-13    514.39
Name: close, Length: 254, dtype: float64
谢谢你的帮助…

。。。这只是意味着熊猫没有向你展示所有的行,那就是“失踪”的行

要显示所有行,请执行以下操作:

with pd.option_context("display.max_rows", None):
    print (df.close.rolling(3, win_type ='triang').sum())

打印功能是否存在限制输出的问题?