代码 import pandas as pd import numpy as np dates = pd.date_range('20130101', periods=6) df=pd.DataFrame(np.arange(24).reshape((6,4)),index=dates, columns=['A','B','C','D']) # 行数,列数,赋值 df.iloc[1,2] = 1111 df.loc['20130101','B'] = 2222 print('-1-') prin…