Showing pages tagged "Python"

Undo keyword filter
  • Oct. 24, 2022

    Leverage the power of Python’s data model in your classes

    Special methods do not only power Python’s built-in objects. They can be used to give custom classes the same look and feel. In this post, I illustrate the use of special methods by defining a simple class of polynomials.

    Continue reading

  • Sept. 2, 2023

    A functional approach to web scraping with Python’s singledispatch decorator - Part I: theory

    For a long time, I have associated web scraping projects with a heavy dose of object-oriented programming. Python developers might be familiar with classes of spiders similar to those used in the web scraping framework Scrapy. In this two-part article, I present a way to write code for web scraping in a functional programming style. In this first part, I explain what I mean by that and what kind of advantages I see with that approach.

    Continue reading

  • Sept. 2, 2023

    A functional approach to web scraping with Python’s singledispatch decorator - Part II: practice

    In this second part, I present a practical example of how to write code for web scraping in a functional programming style. The example illustrates how to use immutable data structures, functions and Python’s @functools.singledispatch decorator to build a resilient data collection pipeline for web scraping.

    Continue reading

  • Dec. 13, 2023

    Working with data from official providers: a brief tour of pandaSDMX

    I have always been an avid user of official statistics. Eurostat, the OECD, the World Bank, other international organisations and national statistics agencies such as the French INSEE are valuable sources of data. In this post, I present a simple and efficient way of interacting with data from these official providers via the SDMX standard using the pandaSDMX Python library.

    Continue reading