This guide will get you creating subplots hassle-free

An example of the plots you’ll be able to create after following this guide (Image source: Author)

Communication is the most important part of any data science project. Without clear communication, all the data science in the world is just math. With clear communication people can grasp the implications of you data analysis, and can make better decisions than they would have without your assistance.

Getting better at communicating your results is vital to having an impact as a data scientist. And, keeping in mind that people often say that a picture is worth a thousand words, creating high-quality plots is a fantastic communication tool.

Since you’re probably doing most of your data analysis in Python these…


How to quickly write Python scripts that use matplotlib to generate professional plots

An example of the plots you’ll be able to create after following this guide (Image source: Author)

Communication is the most important part of any data science project. Without clear communication, all the data science in the world is just math. With clear communication, people can grasp the implications of your data analysis and can make better decisions than they would have without your assistance.

Getting better at communicating your results is vital for having an impact as a data scientist. And, keeping in mind that people often say that a picture is worth a thousand words, creating high-quality plots is a fantastic communication tool.

Since you’re probably doing most of your data analysis in Python these…


By learning these lessons you too can profit during market crashes

Image credit: nattanan23 on pexels

For years now we’ve all read articles telling us how to handle our stock market investments during recessions. We’ve all read the articles talking about how you don’t sell during a recession (No matter how badly your gut is screaming at you do do so). And we’ve all read the advice telling us that we should view crashes as buying opportunities, or chances to get stocks at a discount.

But it’s hard. As we watch our net worth plummet every day we want nothing more than to sell. And forget wanting to buy more stock; we don’t want to invest…


Or what the heck is a lambda function?

Image credit: Shahadat Rahman at Unsplash

Functions are an extremely common form of code organization, simplification, and clarification in Python. They provide several benefits such as:

  • By creating a command that can be reused over and over you can write it once, then use it repeatedly in several places. This shortens the length of a program by avoiding duplication.
  • They provide a name to a command, which you can make descriptive. If a user reads something along the lines of sort_alphabetically(list) they know that a list is about to be sorted alphabetically. …


How to use enumerate, sorted, zip, and reversed to make your life easier

Having the right tools make any job significantly easier. This is just as true for writing computer programs in Python as it is for creating hardware using your hands. A huge part of learning to write programs in a new language is learning about the tools that are available, so you can use them to make your life, and the live’s of your collaborators, easier.

Fortunately, Python has many of these tools readily available for your use. …


If you thought list comprehensions improved your code, wait until you see this

Image Credit: True Agency on Pexels

One of the biggest challenges that beginning programmers have when learning a new language is figuring out how to make their code more readable.

Since collaboration is a critical part of the modern working world it’s vital that we can ensure that other people can easily understand and make use of our code.

At the same time, beginning programmers are struggling to figure out how to make their code work, and figuring out how to make it user-friendly seems like an added hurdle that you just don’t have time for.

I’ve been there, I get it.

Fortunately, there are any…


List comprehensions dramatically reduce the length and complexity of your code

Image Credit: True Agency on Pexels

One of the biggest challenges that beginning programmers have when learning a new language is figuring out how to make their code more readable. Since collaboration is a critical part of the modern working world it’s vital that we can ensure that other people can easily understand and make use of our code. At the same time, beginning programmers are struggling to figure out how to make their code work, and figuring out how to make it user-friendly seems like an added hurdle that you just don’t have time for.

I’ve been there, I get it.

Fortunately, there are any…


Level up your control flow game with these advanced tricks

In a recent article I introduced the fundamentals of control flow in Python programming to readers. These critical skills instruct your programs on which sections of code to run, giving you the power to perform the calculations that you need to perform for different circumstances.

That said, the techniques listed in the article were quite basic and left some efficiency off the table. It was called the fundamentals of control flow after all.

Since that article only covered the basics, I’ll now introduce you to some useful tricks that improve the speed, flexibility, and readability of your control flow processes…


Learn the fundamentals of making your code do what you want it to do

Python has become a favorite programming language among the scientific and data science communities. The relatively easy to understand syntax, open nature of the community, and availability of many useful packages all make it a very attractive language. This has lead to many people, myself included, wanting to become experts in Python to improve our career opportunities.

In order to write scientific Python scripts, you must know how to have your program make decisions. This leads to the concept of control flow.

What is control flow?

“In computer science, control flow (or flow of control) is the order in which individual statements, instructions or…


Image credit: Elliot Alderson from Pixabay, https://unsplash.com/s/photos/dystopian

Last year was inarguably the best year of my life. Society shutting down finally gave me the opportunity to live my life the way I wanted, away from judgemental eyes. Here are all the bucket list items that I used to enhance my life, all thanks to the pandemic:

Be the hero in a dystopian fantasy

The virus was spreading. Every interaction was a chance at infection. No, Covid-19 isn’t the zombie virus, but I was able to pretend. I finally got the chance to live through a pseudo-zombie-pocalypse. I had to prepare. In case of economic collapse I bought a lifetime supply of toilet paper. To…

Peter Grant

Pioneering a new research department at Beyond Efficiency. I write about building science, data science, marketing and leadership.

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