美文网首页我爱编程
python-->pandas笔记

python-->pandas笔记

作者: 晨暮云海 | 来源:发表于2017-05-26 14:33 被阅读0次
import pandas as pd
from pandas import DataFrame,Series

#索引自动0-N的序列
obj = Series([4,7,-5,2])
print obj

#设置索引
obj2 = Series([2,34,-6,3],index=['a','b','c','s'])
print obj2

#索引中的运算
print obj2[obj2>0]

相关文章

网友评论

    本文标题:python-->pandas笔记

    本文链接:https://www.haomeiwen.com/subject/rmcxfxtx.html