Sitemap
PythonIQ

Take your Python coding to the next level and learn from others with these practical, thought-provoking, and insightful articles. We’re all about programming in Python.

Member-only story

5 Python tricks for Data Monkeys

14 min readApr 4, 2024

--

Image by Author with a little help from DALL-E: “A Data Monkey playing with Python”

I learnt a lot from a recent data-wrangling challenge and thought what was interesting and new to me might just be worth sharing with other Python people, and although the “tricks” promised in the title might seem a bit disconnected, they actually all arose from the same, common use case: take the output of someone else’s web scrapers and merge them into an existing database.

This article touches on quite a few intermediate level Python concepts which you might want to read up on separately if they don’t already make sense to you. Knowing the right buzz-words is often half the battle, so here’s a quick summary of what’s coming up:

  • Function Chaining
  • Lambda Functions
  • Context Managers
  • The Pathlib Module
  • Wrapping Functions
  • Monkey Patching
  • Object Orientated Programming (Classes, Objects, and .attributes)
  • The property keyword
  • sorted() versus .sort()
  • Dictionary Comprehensions

Sounds daunting? It’s really not… Unlike some theory based tutorials that take you through every aspect of a particular…

--

--

Pete Fison
Pete Fison

Written by Pete Fison

Experienced Python developer with a special interest in web scraping, data wrangling, ETL, NLP, APIs, and AI. Former IT Director & Video Producer.

PythonIQ
PythonIQ

Published in PythonIQ

Take your Python coding to the next level and learn from others with these practical, thought-provoking, and insightful articles. We’re all about programming in Python.