<jupyter_start><jupyter_text>___Copyright <NAME>For more information, visit us at www.pieriandata.com  Pandas Exercises **TASK: Import pandas**<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK:  Read in the bank.csv file that is located under the 01-Crash-Course-Pandas folder. Pay close attention to where the .csv file is located! Please don't post to the QA forums if you can't figure this one out, instead, run our solutions notebook directly to see how its done.**<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: Display the first 5 rows of the data set**<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: What is the average (mean) age of the people in the dataset?**<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: What is the marital status of the youngest person in the dataset?**[HINT](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.idxmin.html)<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: How many unique job categories are there?**<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: How many people are there per job category? (Take a peek at the expected output)**<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: What percent of people in the dataset were married? **<jupyter_code>#CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: There is a column labeled "default". Use pandas' .map() method to create a new column called "default code" which contains a 0 if there was no default, or a 1 if there was a default. Then show the head of the dataframe with this new column.**[Helpful Hint Link One](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.map.html)[Helpful Hint Link Two](https://stackoverflow.com/questions/19798153/difference-between-map-applymap-and-apply-methods-in-pandas)<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: Using pandas .apply() method, create a new column called "marital code". This column will only contained a shortened code of the possible marital status first letter. (For example "m" for "married" , "s" for "single" etc... See if you can do this with a lambda expression. Lots of ways to do this one!**[Hint Link](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.apply.html)<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: What was the longest lasting duration?**<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: What is the most common education level for people who are unemployed?**<jupyter_code># CODE HERE<jupyter_output><empty_output><jupyter_text>**TASK: What is the average (mean) age for being unemployed?**<jupyter_code># CODE HERE<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11191961191961192, 'fraction_numerical': 0.0045045045045045045, 'mean_word_length': 7.064245810055866, 'pattern_counts': {'":': 0, '<': 54, '<?xml version=': 0, '>': 54, 'https://': 4, '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': '13', 'dir': 'jupyter-structured-clean-dedup', 'id': '179149', 'license': 'MIT', 'n_tokens_mistral': 1002, 'n_tokens_neox': 941, 'n_words': 282, 'path': 'PYTORCH_NOTEBOOKS/00-Crash-Course-Topics/01-Crash-Course-Pandas/07-Pandas-Exercises.ipynb', 'repo_name': 'ChristopherDaigle/pytorch_for_dl', 'size': '2892'}