Your first plot already hints that there’s a lot more to discover in the data! Some majors have a wide range of earnings, and others have a rather narrow range. People with these degrees earn salaries very close to the median income. Other majors have very small gaps between the 25th and 75th percentiles. People with these degrees may earn significantly less or significantly more than the median income. Some majors have large gaps between the 25th and 75th percentiles. This is expected because the rank is determined by the median income. ![]() The median income decreases as rank decreases. Looking at the plot, you can make the following observations: plot() is displayed in a separate window by default and looks like this: Notice that you must first import the pyplot module from Matplotlib before calling plt.show() to display the plot. It served as the basis for the Economic Guide To Picking A College Major featured on the website FiveThirtyEight.įirst, download the data by passing the download URL to pandas.read_csv(): In this tutorial, you’re going to analyze data on college majors sourced from the American Community Survey 2010–2012 Public Use Microdata Sample. Once your environment is set up, you’re ready to download a dataset. If you don’t want to do any setup, then follow along in an online Jupyter Notebook trial. You can also grab Jupyter Notebook with pip install jupyterlab. If you want to stick to pip, then install the libraries discussed in this tutorial with pip install pandas matplotlib. If you prefer a minimalist setup, then check out the section on installing Miniconda in Setting Up Python for Machine Learning on Windows. It’s huge (around 500 MB), but you’ll be equipped for most data science work. If you have more ambitious plans, then download the Anaconda distribution. If you don’t have one yet, then you have several options: You’ll also need a working Python environment including pandas. This way, you’ll immediately see your plots and be able to play around with them. ![]() You can best follow along with the code in this tutorial in a Jupyter Notebook. ![]() Free Bonus: Click here to get access to a Conda cheat sheet with handy usage examples for managing your Python environment and packages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |