摘要:
import pandas as pd import matplotlib.pyplot as plt students=pd.read_excel('c:/Temp/Students.xlsx',index_col='From') print(students) students['2017'].plot.pie(fontsize=8,counterclock=False,startang... 阅读全文
摘要:
import pandas as pd import matplotlib.pyplot as plt users=pd.read_excel('c:/Temp/Users.xlsx') users['Total'] = users['Oct']+users['Nov'] + users['Dec'] #创建Total列 users.sort_values(by = 'Total',inpl... 阅读全文
摘要:
import pandas as pd import matplotlib.pyplot as plt students=pd.read_excel('c:/Temp/Students.xlsx') students.sort_values(by = 'Number',inplace= True ,ascending= False) #sort_values 排序 #以Numberi排序 ... 阅读全文
摘要:
import pandas as pd def age_18_to_30(a): return 18<=a<30 def level_a(s): return 85<=s<=100 students=pd.read_excel('c:/Temp/Students.xlsx',index_col = 'ID') students=students.loc[students.Age... 阅读全文