I spent most of last week in Salt Lake City, at PyCon US 2023. I had an amazing time — I saw old friends, met many new friends, learned a ton about Python (and where it's going), and spoke with many new potential clients. I barely slept, but it didn't matter, because I was having such a great time.
If you haven't ever attended a Python conference, you should! There are oodles of regional and national ones, and I always away with great feelings. This year, I'm expecting to attend four more conferences -- PyCon Israel in early July, Euro Python in mid-July, PyCon Taiwan in early September, and PyCon MEA (Dubai) in mid-October. I hope that I can meet you at one or more of those!
Data and questions
This week, in honor of PyCon US, I decided that we would look at the latest developer survey fromJetBrains, the company that produces (among other things) the PyCharm IDE. Not only can we learn something about Python developers, but there are a few amazing Pandas features that will come in handy here.
I'm still traveling — meeting family and clients before I head back to Israel next week — so if things are slightly askew this week, I apologize.
Here’s what I would like you to do:
- Download the survey results from Google Drive. So far as I can tell, you'll need to download it onto your computer, first by going to this URL:
https://drive.google.com/drive/folders/1nlvy45tE4gFX_oWNxG_UTC1-tLZBTcbR?usp=sharingFrom that page, download the `sharing_data.csv` file onto your computer. I wasn’t able to find an easy way to give you a one-click URL to download it.
- Load the file into a data frame. We'll only look at a handful of the file's (many!) columns:
- All columns starting with `job_role`
- All columns starting with `edu_level`
- All columns starting with `primary_proglang`
- How many people took the survey?
- How many people who took the survey have each kind of educational level? What percentage have a master's, doctoral degree, or professional degree?
- Turn the single `edu_level` column into many different columns, each indicating with a `True`/`False` value whether this person has that educational level. For example, there should be one column indicating whether they got a bachelor's degree, a second for master's degrees, a third for doctoral degrees, and so forth. Add these new columns to the data frame.
- Try to turn these columns back into a single one. Why does this fail?
- What are the 10 most common primary programming languages used by people who took the survey? Are the results surprising?
- How many people have more than one job role? How many have more than 5?
The learning goals for this week include reading selected columns from a file, the fastest/best way to get the size of a data frame, working with one-hot encoding (in both directions), and counting values in odd formats and configurations.
I’ll be back tomorrow with my solution and explanations. If you have questions or suggestions, feel free to post them here!
Reuven