python

超轻量级php框架startmvc

pandas Dataframe行列读取的实例

更新时间:2020-06-05 22:48:01 作者:startmvc
如下所示:importmatplotlib.pyplotaspltimporttkinterimportnumpyasnpimportpandasaspdfrompandasimportSeries,DataFramed

如下所示:


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)

以上这篇pandas Dataframe行列读取的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

pandas Dataframe 行列 读取