x = Series( ['a', True, 1] ) x = Series( ['a', True, 1], index=['first', 'second', 'third'] ) 注意事项: 1、访问:根据位置进行访问。从"0"访问。 2、根据index进行访问。x['second'] 3、不能跨界访问 4、在序列中,不能添加单个因素。 eg:a.append('2') 为错误。 正确写法: n=Series(['2']),x.append(n) 5、需要一个变量承载变量的变化 x=x.append(n) 6、判断一个元素在里面: '2' in x 7.序列的删除: #1 按照索引删除: x.drop('first') #2 按照索引的位置删除 x.drop(x.index[3]) 8、x['2'!=x.values]
Series
猜你喜欢
转载自blog.csdn.net/weixin_40446764/article/details/79634967
今日推荐
周排行