幕布斯5086720
importpandasaspd2importnumpyasnp34#创建列表5a1=[1,2,3]67#arange函数:指定初始值、终值、步长来创建数组8a2=np.arange(0,1,0.1)910#创建数据框11a3=pd.DataFrame({'a':[1,2,3],'b':[4,5,6],'c':[7,8,9]})array转化成dataframeb2=pd.DataFrame(a2)Out[32]:000.010.120.230.340.450.560.670.780.890.9b2.info()RangeIndex:10entries,0to9Datacolumns(total1columns):010non-nullfloat64dtypes:float64(1)memoryusage:160.0bytes