import numpy as np
import pandas as pd
# 01 定义绘图的数据
myarry = np.array([[1,2,3],[2,3,4],[3,4,5,]])
rowindex = ['row1','row2','row3']
colname = ['col1','col2','col3']
mydateframe = pd.DataFrame(data=myarry,index=rowindex,columns=colname)
print(mydateframe)
print('访问col3的数据: ')
print(mydateframe['col3'])
机器学习_05_pandas的dataframe
最新推荐文章于 2023-05-14 19:49:52 发布