import numpy as np import pandas as pd 认识 Time series data is an impotant from of data in many different fields, such as finance, economics, ecology, neuroscience(神经学) and physics. Anything that is observed or measured at many points in time forms a
实现斐波那契数列的集中方法 返回一个数 def fib(max): n, a, b = 0, 0, 1 while n < max: print(b) a, b = b, a+b n += 1 fib(5) 返回列表 def fib(max): res = [] n, a, b = 0, 0, 1 while n < max: res.append(b) a, b = b, a+b n += 1 return res fib(5) 使用可迭代对象 from collections import
导入模块: from pandas import DataFrame import pandas as pd import numpy as np 生成DataFrame数据 df = DataFrame(np.random.randn(4, 5), columns=['A', 'B', 'C', 'D', 'E']) DataFrame数据预览: A B C D E 0 0.673092 0.230338 -0.171681 0.312303 -0.184813 1 -0.504482 -0.