摘要:
Pandas的对齐运算 1、算术运算和数据对齐 1、Series 的对齐运算 s1 = pd.Series(np.arange(4),index=['a','b','c','d']) s2 = pd.Series(np.arange(5),index=['a','c','e','f','g']) s 阅读全文
posted @ 2021-11-12 23:41
坤坤无敌
阅读(180)
评论(0)
推荐(0)
摘要:
高级索引 1、loc 标签索引 2、iloc 位置索引 3、ix 标签与位置混合索引 1、loc 标签索引 # Series ps1 Out: a 888 b 1 c 2 d 3 e 4 dtype: int64 # loc 标签索引 # loc 是标签名的索引,自定义的索引名 ps1['a':'c 阅读全文
posted @ 2021-11-12 01:05
坤坤无敌
阅读(68)
评论(0)
推荐(0)
摘要:
Pandas的索引操作 1、Series和DataFrame中的索引都是Index对象 import numpy as np import pandas as pd ps1 = pd.Series(range(5),index=['a','b','c','d','e']) type(ps.index 阅读全文
posted @ 2021-11-12 00:41
坤坤无敌
阅读(389)
评论(0)
推荐(0)
浙公网安备 33010602011771号