[Administrative note: If you learned Python years ago, then you might not even know how much Python has changed, and what techniques you're missing out on . My upcoming 8-hour "python --update" course will help you understand everything from structured pattern matching to asyncio, it is free to LernerPython members. For more info, go to https://LernerPython.com/python-update.]
I'm in Krakow, Poland for the EuroPython conference, an amazing annual conference that I have been attending (and speaking at) since 2019. I gave a tutorial on decorators yesterday (notes and exercises are available at https://github.com/reuven/EuroPython-Decorators-2026-07), and am also chairing a number of sessions.
I've also had a chance to explore Krakow a bit, and it's quite a nice city -- the most-toured city in Poland, I've heard. As a result, I thought it would be interesting to explore hospitality and tourism data about Poland in general, and Krakow in particular.
Data and four questions
The Polish government, like many other democracies, makes their data available to the public via a Web portal at https://bdl.stat.gov.pl/bdl/start . If your Polish isn't so hot, you can click on the UK flag toward the top right to get an English-language version of the portal. Click on "data by areas," and on the new page, click on "tourism." We'll look at two different data sets from here:
- First, we'll look at occupancy rates of facilities in Malopolska ("Lesser Poland"), the region in which Krakow is the largest city and capital. Choose "occupancy rate of bed places by type of facilities," also known as parameter P2366. Choose all types and all years in Malopolska, and download the values in zipped CSV.
- Then, we'll look at tourists on a monthly basis. That's still under the tourism info, but under the group "tourist accommodation establishments (monthly data)," and the subgroup, "occupancy in tourist establishments by month". I chose years 2019-2026, all months, hotels, and total tourists – and again, only Malopolska.
Paid subscribers, both to Bamboo Weekly and to my LernerPython+data membership program (https://LernerPython.com) get all of the questions and answers, as well as downloadable data files, downloadable versions of my notebooks, one-click access to my notebooks, and invitations to monthly office hours.
Learning goals for this week include grouping, pivot tables, plotting, dates and times, and regular expressions.
Here are my four questions for this week. I'll be back tomorrow with my solutions and explanations:
- Read the P2366 data (percentage occupancy, per year, of each type of facility) into a Pandas data frame, ignoring the empty columns. Which type of facility has the highest mean occupancy rate? What type of facility, in 2025 (the most recent year for which they provide data) was the highest? In 2025, which types of facilities had surpassed their percentage occupancy level in 2019, before the covid-19 pandemic?
- Create a line plot, showing the percentage occupancy rate in each year, for each type of facility with "otel" or "ostel" in its description. During the pandemic (2020 and 2021), which types of facility did the best?