import pandas as pd
df = pd.read_csv('/content/tips.csv')
df.head(10)
df.info()
df.describe()
df.shape
df['time'].unique()
df['time'].value_counts()
df['time'].value_counts(normalize=True)
df[['total_bill']]
df[['total_bill', 'tip']]
df[0:5]
df[df['time'] == 'Dinner']
df_dinner = df[df['time'] == 'Dinner']
df_dinner.to_csv('dinner_tips.csv')
df[df['tip'] > 5]
df[(df['smoker'] == 'Yes') & (df['time']=='Dinner')]
print(df['total_bill'].mean())
print(df['total_bill'].median())
print(df['total_bill'].min())
print(df['total_bill'].max())
print(df['total_bill'].sum())
Subscribe to our newsletter!
You will receive our monthly newsletter with the most relevant Russia-related research news
INSTITUTE FOR EUROPEAN, RUSSIAN, AND EURASIAN STUDIES
1957 E St., NW, Suite 412,
Washington, DC 20052