The topic discussed here is a challenge that every aspiring data scientist/ analyst stumbles upon at the start of their data science journey. The challenge with this problem is that you will continue to encounter it in some scenario or the other, and every time you do that, you will google to find the solution. In this and the next few tutorials, we will learn how to work with date datatype.
During the data preparation stage of an analytics project, a common challenge is to have a list of values in a table’s column. Typically, in a scenario like this, an analyst would like to split it into multiple records. A visual representation of this case is as below:
In the last tutorial, we demonstrated the Pandas melt function to reshape the wide-data form into the long-form. This tutorial will focus on the opposite process. To bring everyone on the same page, presenting a visual of the problem we are trying to solve:
One of the data wrangling scenarios we commonly encounter during the pre-processing stage of an analytics project is to reshape the data. Most of our colleagues starting their data science journey struggle to convert columns into rows and vice versa. The image presented below will help in better understanding the problem we are trying to address:
Most of us have used the if-else conditional blocks in one or the other programming language. Python goes a step ahead and supports the use of the else conditional block in looping structures too. In this tutorial, we will see the use of the else conditional blocks within the while and else looping constructs.
Please note, understanding loops and conditionals in Python is a prerequisite to this tutorial. If you are new to the Python language and want to set it up on your system, please go through this tutorial.
Before we start with the else conditional block, let us…
When writing regular expressions (regex) in Python language, we always start with the letter r. In this tutorial, we will understand the reason behind using it by answering the following questions:
An escape sequence is a character set that does not represent itself when used in a text definition. It gets translated to some other character or character set that is otherwise difficult to present…
When working on a data science project, we spend more than 70% of our time adjusting data to our needs. While munging data, we encounter many scenarios for which ready-made solutions are not available in standard libraries like pandas.
One such scenario is when we have to create multiple dataframes from a single dataframe. We encounter this scenario when we have a categorical variable, and we want to split the dataframe based on the different values of this variable. A visual representation of this case is as below:
A good handle on Package and Environment management ensures that we continue to avail the benefits of the latest package functionalities while ensuring that projects running on older package releases do not break down. This tutorial is a beginner’s guide to learn both package and environment management using Conda that comes bundled with Anaconda distribution. If you are new to Python and don’t have Anaconda setup on your system, we recommend that you read through this tutorial before proceeding further.
Conda is known to be a complete environment and package management tool. It does wonders when it comes to cross-platform…
With the ever-increasing demand for Python programming language, the first task which any beginner struggles with is the setting up of the right development environment.
This tutorial aims to introduce you to Anaconda Platform, a free and open-source distribution of Python and R programming languages for scientific computing for simplifying package management and deployment.
There are multiple reasons which make Anaconda a preferred choice for learners beginning with Python:
Let’s think of a scenario before we start with this tutorial:
Your manager calls you and instructs, “the client wants refreshed data every day by 6 AM IST. Please change your shift timings and ensure script execution post client’s batch completes”. What does this mean? This means, starting today, you will start losing your precious sleep, time with family and friends, and above all, will be working on executing some random script at the most unproductive hour of the day.
If the above sounds familiar and you want to save yourself from a nightmare like this, please read further. …