摘要:
import pandas as pd #生成一些数据 data = {'A': [1, 2, 3],'B': [4, 5, 6]} df = pd. DataFrame (data) #将字典转化为dataframe格式 print(df) # 打印dataframe #进行一些操作 df['A' 阅读全文
摘要:
import sys from datetime import datetime import numpy as np import matplotlib.pyplot as plt #使用NumPy计算 def numpysum(n) : a = np.arange(n)**2 b = np.ar 阅读全文
摘要:
阅读全文
摘要:
>>> np.sctypeDict {'?': <class 'numpy.bool_'>, 0: <class 'numpy.bool_'>, 'byte': <class 'numpy.int8'>, 'b': <class 'numpy.int8'>, 1: <class 'numpy.int 阅读全文
摘要:
import numpy as np arr=np.arange(0,10,1) arr1=np.arange(0,1,0.1) array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 阅读全文
摘要:
>>> for ii in range(1,10,0.1): print(ii) Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> for ii in range(1,10,0.1):TypeErro 阅读全文