s4[s4 > s4.median()]
d = pd.DataFrame({ 'Name': pd.Series(['Alice','Bob','Chris']),
'Age': pd.Series([ 21,25,23]) } )
df_sub.loc[10:20,['rank','sex','salary']]
df_sub.iloc[10:20, [0,3,4,5]]
df_sorted = df.sort_values(by = ['service', 'salary'], ascending = [True,False])
flights[['dep_delay','arr_delay']].isnull().sum()
flights[['dep_delay','arr_delay']].agg(['min','mean','max'])
flights.agg({'dep_delay':['min','mean',max], 'carrier':['nunique']})
frequent_items = apriori(df1, min_support=0.05, use_colnames=True)
rules[rules['antecedents'] == {'Eggs', 'Kidney Beans'}]
rules[(rules['lift'] >= 2) & (rules['confidence'] >= 0.6) & (rules['support'] >= 0.2)]
plt.hist(df['salary'],bins=8, density=1)
2) seaborn package와 연계해서 사용
sns.distplot(df['salary'])
3) pandas에 있는 plot(kind='') 사용
df.groupby(['rank'])['salary'].count().plot(kind='bar')
barplot, violinplot, regplot, boxplot, swarmplot, catplot, pairplot