pandas Dataframe行列读取的实例
如下所示:
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)
相关推荐
roamer 2020-10-29
三石 2020-08-23
QianYanDai 2020-08-16
mmmjyjy 2020-07-16
QianYanDai 2020-07-05
QianYanDai 2020-07-05
jiahaohappy 2020-06-21
QianYanDai 2020-06-16
zhangxiaojiakele 2020-05-25
jzlixiao 2020-05-15
jiahaohappy 2020-05-12
zhangxiaojiakele 2020-05-11
jzlixiao 2020-05-08
Series是一种类似于一维数组的对象,由一组数据以及一组与之对应的索引组成。 index: 索引序列,必须是唯一的,且与数据的长度相同. 如果没有传入索引参数,则默认会自动创建一个从0~N的整数索引
jzlixiao 2020-05-09
三石 2020-10-30
三石 2020-10-29
wangquannuaa 2020-10-15
wangquannuaa 2020-09-29
jzlixiao 2020-09-15