test_length = data[(data.index >= '2017-12-31')].shape[0]报错TypeError: Invalid comparison between dtype=int64 and str
index 是个int,不可以和字符串比较大小