Scream if you want to code faster

Running and software engineering are two very different disciplines. Running is fundamentally a very simple activity, software engineering can be pretty complex. So how can slamming your ham poles against the ground repeatedly to the point of exhaustion improve your coding? That’s what I’m going to try lay out here.

Also, FYI I had never really run until I hit 23, and I wouldn’t say I’m a good runner but it’s all relative so I try to only compare me to myself, and I’m a much better runner than I was before I started running… Get out there and give…

Understanding common pitfalls and unexpected behaviour, how to avoid letting the cats scratch you

Categorical datatypes are often touted as an easy win for cutting down DataFrame memory usage in pandas, and they can indeed be a useful tool. However, if you imagined you could just throw in a .astype("category") at the start of your code and have everything else behave the same (but more efficiently), you’re likely to be disappointed.

This article focuses on some of the real world problems you are likely to face when using categorical datatypes in pandas; either adjusting your existing mindset to write new code using categories, or trying to migrate existing pipelines into flows using categorical columns.

Understanding why certain .apply()’s work well and why some give poor performance.

If you’re reading this article, I guess you have at some point used the .apply(…) method in the popular python data processing library, pandas. If you haven’t then maybe you’re lost, and you might not get very much out of this article (but kudos if you read it anyway)…

If this article is written well, and you read and understand it successfully, you can hope to;

  • Aquire greater awareness of what .apply(…) does in different scenarios (Spoiler, it might not always be what you think);
  • Know when .apply(…) might be a good choice and when it might be better to…

Sven Harris

Data Scientist/Python Engineer from the UK. Living in Amsterdam, working in payments.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store