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'])

本文介绍如何利用Python的Pandas库进行数据处理及绘图。通过创建DataFrame实例,演示了如何定义数据并访问特定列的数据。此教程适合初学者理解和实践Pandas的基本操作。

2634

被折叠的 条评论
为什么被折叠?



