Why R Users Find It Difficult to Switch to Python: The Case for Method Chaining

I had started learning python long before I ever used R. Then I started a job where all the legacy codes were in R and I was kind of forced to learn R, albeit reluctantly. But once I get going, I found the language surprisingly good. Before learning python I had mostly used VBA and SAS. The one thing I started liking the most about R was the method chaining in dplyr....

September 2, 2024 · 5 min · 994 words · Maddy

Bridging the Gap Between R and Python: Introducing a select Method for Python's Pandas

For data analysts and data scientists who have transitioned from R to Python, one of the most noticeable differences lies in the way these languages handle DataFrame operations. R users, especially those familiar with the dplyr package, often find themselves missing the simplicity and intuitiveness of R’s select function when they switch to Python’s pandas. This article explores why Python lacks a direct equivalent of R’s select function, the limitations of using the available alternatives, and how a custom select method can make the transition smoother while enhancing the efficiency of pandas method chaining....

August 10, 2024 · 6 min · 1272 words · Maddy

Exploring Python's dir(), getattr(), and setattr() with simple objects

Python provides powerful built-in functions like dir(), getattr(), and setattr() that allow you to explore, access, and modify object attributes dynamically. These tools are particularly useful when working with custom objects, debugging, or when your code needs to interact with objects in a flexible way. In this article, we’ll walk through these functions using a simple custom class, and demonstrate their practical applications. Introducing a Simple Custom Class Let’s start by defining a basic class that we’ll use throughout this article:...

August 8, 2024 · 4 min · 739 words · Maddy

Deploying Hugo on Hostinger using ssh

I tried building this site for personal blogging for data and visualizations. Since building website is not my strength I was looking for something simpler and hence I choose Hugo which seems to be quite popular framework for building static website. Once getting the framework ready, I selected Hostinger for hosting. I wanted to be in a position where I could finish a page/blog and the site would get published in one push....

July 21, 2024 · 5 min · 872 words · Maddy