Answered step by step
Verified Expert Solution
Question
1 Approved Answer
First, you'll need to download the dataset Top American Colleges 2022 from Kaggle.com and get it into this directory. You'll need to make an
First, you'll need to download the dataset "Top American Colleges 2022" from Kaggle.com and get it into this directory. You'll need to make an account first. Below is a list of useful functions. Part of this homework is practicing reading the documentation, so you'll want to look them up as you go. I'd recommend starting with this: https://pandas.pydata.org/docs/user_guide/10min.html. Once you've read that, in general you can find the API for any of these functions by searching their name plus pandas. List of helpful functions: read_csv > head unique value_counts df.columns ('columns' is a dataframe variable that tracks the columns) groupby apply (An important note about this one--pay careful attention to the weird axis argument. When you apply over a series, you often don't need it, but when you apply over a dataframe axis=1 and axis=0 will do very different things.) isin fillna etc. astype hist The Basics First, read the dataframe in. Store it in a variable called "df". Let's get a feel for our dataframe. Print out a list of columns Now print out the first ten elements. There's a single function that does it by default. Exploration Now let's learn to do some exploration. Try printing out the median "medianBaseSalary" Making it a little more complicated--print out the median "medianBaseSalary" only for urban colleges. Print out the number of colleges by state. Your results should look something like: NY 63 CA 55 Now, still using one statement, let's print out median "medianBaseSalary" for all different possible values of "campusSetting". You'll need a statement we haven't used yet. + + Markdown Display just the line for University of Maryland. (There are a couple of ways of doing this.) Take the website column and change it so that no string includes "http://" or "www" Create a new column called "faculty" that computes the number of faculty at each university Graphs Markdown Let's do some very basic graphing here! Create a histogram for the student population. Python Python Python Python Python Modifications Let's start modifying our dataframe! Remember, dataframe operations return a copy by default, so you'll either need to use the inplace=True, or just assign the dataframe back into itself (as in, df = df.someFunction ()). Start by filling in all blank phone numbers with "no number" Python Python Python Python Python Python Python
Step by Step Solution
★★★★★
3.29 Rating (152 Votes )
There are 3 Steps involved in it
Step: 1
Answer Let solve this question in step by step 1 Read the DataFrame from CSV You should first download the Top American Colleges 2022 dataset from Kag...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started