Pandas 是基于NumPy 的一种工具,该工具是为解决数据分析任务而创建的。pandas 纳入了大量库和一些标准的数据模型,提供了高效地操作大型数据集所需的工具。...>>> np.insert(a, 1, 5) # 在数组中插入项
>>> np.delete(a,[1]) # 从数组中删除项
合并数组
>>> np.concatenate((a,d),axis...,d))# 创建堆叠的列阵列
array([[ 1, 10],
[ 2, 15],
[ 3, 20]])
>>> np.c_[a,d] # 创建堆叠的列阵列...Pandas
Pandas库建立在NumPy上,并为Python编程语言提供了易于使用的数据结构和数据分析工具。...drop_duplicates('Type',
keep='last') # 去重
>>> df.index.duplicated() # 检查索引重复