<jupyter_start><jupyter_text>Homework: Intro to Pandas_Authors: <NAME> (L.A.)_--- Welcome!  Pandas: Intro Practice ProblemsIn this homework, you're going to write code for a few problems. You'll be practicing these programming concepts we've covered in class:* Reading data sets into Pandas.* Filtering, manipulating, and sorting data sets.* Basic exploratory data analysis with Pandas.  1. Import Pandas with an alias of `pd`.<jupyter_code>import pandas as pd<jupyter_output><empty_output><jupyter_text>2. Read in the NBA players `csv` into a variable called `nba_df`. This is a data set of NBA players from 2015. The filename is `NBA_players_2015.csv`.<jupyter_code>nba_df = pd.read_csv('NBA_players_2015.csv')<jupyter_output><empty_output><jupyter_text>3. Look at the first five rows of the data set.<jupyter_code>nba_df.head()<jupyter_output><empty_output><jupyter_text>4. Check out the shape of the data set.<jupyter_code>nba_df.shape<jupyter_output><empty_output><jupyter_text>5. Run some summary stats on the data set with the `describe()` function.<jupyter_code>nba_df.describe()<jupyter_output><empty_output><jupyter_text>6. Sort the data set in on the `players` column in alphabetical order.<jupyter_code>nba_df.sort_values('player')<jupyter_output><empty_output><jupyter_text>7. Filter the data set. Create three sub DataFrames from the `position` colum for `G`, `F`, and `C`.<jupyter_code>guards_df = nba_df[nba_df['pos'] == 'G'].copy()
forwards_df = nba_df[nba_df['pos'] == 'F'].copy()
center_df = nba_df[nba_df['pos'] == 'C'].copy()<jupyter_output><empty_output><jupyter_text>8.  Run `describe()` on these new DataFrames. Compare the mean field goals (the `fg` column) between positions.<jupyter_code>guards_df.describe()
forwards_df.describe()
center_df.describe()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11940298507462686, 'fraction_numerical': 0.01105583195135434, 'mean_word_length': 7.116591928251121, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 34, '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': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '637016', 'license': 'MIT', 'n_tokens_mistral': 661, 'n_tokens_neox': 626, 'n_words': 171, 'path': 'unit-6-pandas/instructor-resources/hw-10wk-12d/pandas_intro_hw_solutions.ipynb', 'repo_name': 'rodriguezda/python-programming-104', 'size': '1814'}