I'm in Prague, attending the Euro Python conference (https://ep2025.europython.eu/), which is always a high point of the year for me. I gave a tutorial on Tuesday called "Let's build a dictionary!" (https://ep2025.europython.eu/session/let-s-build-a-dictionary), and will be speaking on Friday about, "What does = do?" (https://ep2025.europython.eu/session/what-does-do). If you're at the conference, please come by and say "hello" in person!
Whenever I'm in Europe, I'm always amused by the number of "in my country" conversations people have. Someone will say, "In my country, we do X," and someone will respond, "Really? In my country, we do Y." And then everyone goes around, explaining how things are done in their country -- or their portion of their country.
It's both interesting and impressive to see the diversity of cultures, practices, and (of course) languages in Europe. The fact that so many countries are part of the European Union, and have managed to smooth over and standardize so many of these differences, is even more impressive -- at least, to me as an outsider.
This week, I thought it would be appropriate to compare European countries in a few ways. We'll use data from Eurostat, the European Union's statistics department – whose data sometimes includes statistics for a number of non-EU countries, too. These statistics might not make for the most scintillating "in my country" conversations, but they will give you some additional perspective on how countries in Europe compare with one another.
Data and six questions
This week's data comes from Eurostat (https://ec.europa.eu/eurostat/), which collects, analyzes, and publishes data on a wide variety of topics. We'll look at only two of these, trying to answer a few questions about European countries' similarities and differences:
- Number of weekly hours worked: https://ec.europa.eu/eurostat/databrowser/view/lfsa_ewhun2/default/table
- Internet access: https://ec.europa.eu/eurostat/databrowser/view/isoc_ci_in_h/default/table
On each of these pages, click on the "download" button above the data set.
Paid subscribers can download both of the files mentioned here in a zipfile.
Here are my six questions:
- First, let's look at how many weekly work hours people put in. Read from "Sheet 1" in the work file into a Pandas data frame. Examine the file to see what values should be considered
NaN
. make the country-name column the index. Explain a reason why the EU data and Euro-area might differ. - In 2024 (the most recent year for which we have data), which five countries worked the greatest and least number of hours? Which five countries have most increased the number of hours worked (as a percentage) since 2015, and which have decreased?