<jupyter_start><jupyter_text>Statimport dataset from https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/06_Stats/US_Baby_Names/US_Baby_Names_right.csv<jupyter_code>import pandas as pd
df = pd.read_csv("https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/06_Stats/US_Baby_Names/US_Baby_Names_right.csv")
df.head(10)<jupyter_output><empty_output><jupyter_text>Delete the column 'Unnamed: 0' and 'Id'<jupyter_code>df = df.drop(["Unnamed: 0", "Id"], axis=1)
df.head()<jupyter_output><empty_output><jupyter_text>Are there more male or female names in the dataset?<jupyter_code>df["Gender"].value_counts()<jupyter_output><empty_output><jupyter_text>Group the dataset by name and assign to names<jupyter_code>df = df.drop(["Year"], axis =1)
df.head()
name = df.groupby("Name").sum()
name.head()
name.sort_values("Count", ascending = 0).head()
name.sort_values("Count", ascending = 1).head()<jupyter_output><empty_output><jupyter_text>How many different names exist in the dataset?<jupyter_code>len(name)<jupyter_output><empty_output><jupyter_text>What is the name with most occurrences?<jupyter_code>name.Count.idxmax()<jupyter_output><empty_output><jupyter_text>How many different names have the least occurrences?<jupyter_code>len(name[name.Count == name.Count.min()])<jupyter_output><empty_output><jupyter_text>What is the median name occurrence?<jupyter_code>name[name.Count == name.Count.median()]<jupyter_output><empty_output><jupyter_text>What is the standard deviation of names?<jupyter_code>name.Count.std()
name.Count.median()<jupyter_output><empty_output><jupyter_text>Get a summary with the mean, min, max, std and quartiles<jupyter_code>name.describe()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1363900174114916, 'fraction_numerical': 0.006964596633778294, 'mean_word_length': 10.342105263157896, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 2, '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': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '601223', 'license': 'MIT', 'n_tokens_mistral': 658, 'n_tokens_neox': 631, 'n_words': 95, 'path': 'DataTalks_Stat I.ipynb', 'repo_name': 'gympohnpimol/Pandas-Data-Talks', 'size': '1723'}