当前位置:主页 > 软件编程 > Python代码 >

pandas Dataframe行列读取的实例

时间:2020-12-12 09:18:12 | 栏目:Python代码 | 点击:

如下所示:

import matplotlib.pyplot as plt 
import tkinter 
import numpy as np 
import pandas as pd 
from pandas import Series,DataFrame 
data = {‘a':[1,2,3], 
‘c':[4,5,6], 
‘b':[7,8,9] 
} 
frame = DataFrame(data,index=[‘one','two','three']) 
print(frame) 
print(frame.iloc[2]) 
print(frame.loc[‘three']) 
print(frame.b)

您可能感兴趣的文章:

相关文章