<jupyter_start><jupyter_text>you can create a header 6 levels- lists    - pt2    1. item 12. item 2    1. indented item 1<jupyter_code>pandas.read_csv('../data/gapminder.tsv', delimiter='\t')
df = pandas.read_csv('../data/gapminder.tsv', delimiter='\t')
import pandas as pd
df = pd.read_csv('../data/gapminder.tsv', delimiter='\t')
type(df)
df.shape
df.shape()
df.info()
df.head()
df.columns
df.values
df.index
df.dtypes
country_df = df['country']
country_df
type(country_df)
df[['country']]
df[['country', 'continent', 'year']].head()
df = pd.read_csv('../data/gapminder.tsv', delimiter='\t')
del df['country']
df.head()
d = df.drop(columns='year', inplace=True)
d
df = pd.read_csv('../data/gapminder.tsv', delimiter='\t')
df.head()
df.loc[0]
df.loc[-1]
df.iloc[0]
df.iloc[-1]
df.loc[[0, 1, 23]]
df.loc[0, :]
df.loc[:, ['year', 'pop']]
df.iloc[:, [3, 4]]
df.loc[df['country'] == 'United States', :]
df['country'] == 'United States'
df.country # this is a convenience
df.loc[(df['country'] == 'United States') | (df.year == 1982), :]
df.head()
df.groupby('year')['lifeExp'].mean()
type(df.groupby(['year', 'continent']))
df.groupby(['year', 'continent'])[['lifeExp', 'gdpPercap']].mean()
gp = df.groupby(['year', 'continent'])[['lifeExp', 'gdpPercap']].mean()
gp.reset_index()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.24655436447166923, 'fraction_numerical': 0.01761102603369066, 'mean_word_length': 5.438423645320197, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '253873', 'license': 'MIT', 'n_tokens_mistral': 562, 'n_tokens_neox': 540, 'n_words': 102, 'path': 'notebooks/01-intro.ipynb', 'repo_name': 'chendaniely-teaching/2019-03-07-python', 'size': '1306'}