# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import pandas as pd
import numpy as np 

import seaborn as sns 

sns.get_dataset_names()

tips = sns.load_dataset('tips')

tips.head()

# Mean 
tips.groupby('sex').mean() 

# Std 
tips.groupby('sex').std() 

# min 
tips.groupby('sex').min() 
# max
tips.groupby('sex').max() 
# count


# describe
tips.groupby('sex').describe() 

tips.groupby('day').agg( ['mean' , 'min'])

tips.groupby('day').agg( {'total_bill':'mean' , 'tip':'min'})

tips.groupby(['sex' ,'day']).agg( {'total_bill':'mean' , 'tip':'min'})

# +
# Pivot tables: 
# -

tips.pivot_table(index = 'day'  , columns='sex'  , values='total_bill')



StarcoderdataJupyterScriptsDedupFiltered