1、导入包,以及随机创建一个Dataframe数据,如下所示,Dataframe(*data, *index, *column)

3、第二种方法函数:注意pandas有些版本不能用用ix函数,最新pandas不支持ix函数,颇稚仑蓝旧版ix函数可以用数字索引,也可以用index和column索引

5、第四种方法函数:如下图所示用iloc函数读取,iloc只能用数字索引,不能用索引名

时间:2024-10-12 02:16:59
1、导入包,以及随机创建一个Dataframe数据,如下所示,Dataframe(*data, *index, *column)
3、第二种方法函数:注意pandas有些版本不能用用ix函数,最新pandas不支持ix函数,颇稚仑蓝旧版ix函数可以用数字索引,也可以用index和column索引
5、第四种方法函数:如下图所示用iloc函数读取,iloc只能用数字索引,不能用索引名