pandas 使用

ss = [['xx','m',22],['cc','w',33],['jj','w',44],['qq','m',11]]
import pandas as pd
df = pd.DataFrame(ss)
df.columns=['name','gender','age']


phone = pd.Series([21000,18900,18000])

phone = pd.Series([21000,18900,18000],index=['iphone7','oppo','sunsumg'])

phone[1]      phone[1:3]      phone['oppo']   


ss = [['xx','m',22],['cc','w',33],['jj','w',44],['qq','m',11]]
import pandas as pd
df = pd.DataFrame(ss)
df.columns=['name','gender','age']
df

df.head(3)     df.tail(3)      df.info()     df.describe()

 

posted @ 2017-04-19 22:19  Erick-LONG  阅读(168)  评论(0编辑  收藏  举报