How To GroupBy A Dataframe In Pandas And Keep Columns

[toc] The groupby() function saves you a ton of time and headache when analyzing data. It is fast and eases handling massive data. However, you may fail to maximize its potential if you don’t know how to use it. That is why this tutorial explains DataFrame grouping using relatable challenges, code snippets, and solutions. πŸ’‘ … Read more

Matplotlib – How to Change Subplot Sizes

How to change the size of your matplotlib subplots? The method .subplots() can easily generate multiple subplots within the same plotting figure. But as you may have already noticed, all the subplots have the exact same size and moreover, their size will be adjusted automatically, depending on how many of them you want to display … Read more

How to Read a Dictionary from a File

Problem Formulation and Solution Overview In this article, you’ll learn how to read in a Dictionary file and format the output in Python. To make it more fun, we have the following running scenario: Jeff Noble, a Marine Archeologist, has put together a team to search for shipwrecks each month. This month, they will search … Read more

How to Write Huge Amounts of Generated Data to a File in Python?

Problem formulation Sometimes we need to generate massive amounts of data. For example, to perform bootstrapping or jackknifing of our actual data. To get lots of parameterized dummy data, learn how to use new libraries or adjust the model’s hyperparameters. Or benchmark different solutions or debug and optimize our code. Generating this data is expensive, … Read more

DevOps Specialist — Income and Opportunity

Before we learn about the money, let’s get this question out of the way: What Is DevOps ? Let’s have a look at the definition from TechTarget: A DevOps engineer/specialist works with engineers, software developers, system operators (SysOps) and administrators (SysAdmins), and other production IT professionals to release and deploy code in the real world. … Read more

Site Reliability Engineer (SRE) — Income and Opportunity

Before we learn about the money, let’s get this question out of the way: What Is Site Reliability Engineering? Let’s have a look at the definition from the official Site Reliability website: Site reliability engineering applies software engineering principles to infrastructure and operations to create scalable and highly reliable software systems. It is closely related … Read more

How do I Return Multiple Values From a Function?

[toc] Problem Statement: How to return multiple values from a given function in Python? Functions are used to break the program into smaller chunks. As the program grows larger, functions make it more organized. In Python, functions are generally used for performing a specific task that involves returning a particular value. But in some cases, … Read more

Machine Learning Engineer — Income and Opportunity

Before we learn about the money, let’s get this question out of the way: What Is Machine Learning? Let’s have a look at the definition: Machine learning (ML) is a subfield of artificial intelligence (AI) that focuses on the automatic creation of models from training data that predict outcomes accurately. The automatic creation of an … Read more