<jupyter_start><jupyter_text>US - Baby Names  Introduction:We are going to use a subset of [US Baby Names](https://www.kaggle.com/kaggle/us-baby-names) from Kaggle.  In the file it will be names from 2004 until 2014 Step 1. Import the necessary libraries<jupyter_code>%config IPCompleter.greedy = True
import pandas as pd 
pd.__version__<jupyter_output><empty_output><jupyter_text>Step 2. Import the dataset from this [address](https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/06_Stats/US_Baby_Names/US_Baby_Names_right.csv).   Step 3. Assign it to a variable called baby_names.<jupyter_code>baby_names = pd.read_csv('US_Baby_Names_right.csv')
baby_names.head()<jupyter_output><empty_output><jupyter_text>Step 4. See the first 10 entries<jupyter_code>baby_names.head(10)<jupyter_output><empty_output><jupyter_text>Step 5. Delete the column 'Unnamed: 0' and 'Id'<jupyter_code>bnd = baby_names.drop(['Unnamed: 0', 'Id'], axis='columns')
bnd.head()<jupyter_output><empty_output><jupyter_text>Step 6. Is there more male or female names in the dataset?<jupyter_code>bnd.Gender.value_counts()<jupyter_output><empty_output><jupyter_text>Step 7. Group the dataset by name and assign to names<jupyter_code>nmc = bnd.groupby('Name').sum().drop('Year', axis='columns').sort_values('Count',ascending=False)
nmc.head()<jupyter_output><empty_output><jupyter_text>Step 8. How many different names exist in the dataset?<jupyter_code>nmc.shape[0]<jupyter_output><empty_output><jupyter_text>Step 9. What is the name with most occurrences?<jupyter_code>nmc.iloc[0]<jupyter_output><empty_output><jupyter_text>Step 10. How many different names have the least occurrences?<jupyter_code>nmc[nmc.Count == nmc.Count.min()].size<jupyter_output><empty_output><jupyter_text>Step 11. What is the median name occurrence?<jupyter_code>nmc[nmc.Count == nmc.Count.median()]<jupyter_output><empty_output><jupyter_text>Step 12. What is the standard deviation of names?<jupyter_code>nmc.Count.std()<jupyter_output><empty_output><jupyter_text>Step 13. Get a summary with the mean, min, max, std and quartiles.<jupyter_code>nmc.describe()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12093023255813953, 'fraction_numerical': 0.01627906976744186, 'mean_word_length': 8.27155172413793, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, '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': '12', 'dir': 'jupyter-structured-clean-dedup', 'id': '610958', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 828, 'n_tokens_neox': 782, 'n_words': 156, 'path': '06_Stats/US_Baby_Names/Exercises.ipynb', 'repo_name': 'society765/pandas_exercises', 'size': '2150'}