#读取和处理数据并作图
import pandas as pd
df = pd.read_csv(open(r'D:\code\data\ch4ex2.csv'),index_col=[0,'name'])
df = df.ix[:,['grade']]
df
df.plot(kind='bar')
#读取和处理数据并作图
import pandas as pd
df = pd.read_csv(open(r'D:\code\data\ch4ex2.csv'),index_col=[0,'name'])
df = df.ix[:,['grade']]
df
df.plot(kind='bar')