Difference Between Enums vs String Literal Unions in TypeScript

TypeScript Enums vs Types Explained with Examples

When working with TypeScript, developers often need to reuse the methods or variables in many places or need clear labels. In TypeScript, String literal unions are simple and best for one-time use cases, and Enums give more structure and are useful when the options are reused in many places or need clear labels. Use string … Read more >>

How to Compare Dates Without Time in TypeScript

compare Dates Without Time in TypeScript

Recently, while working on a TypeScript feature for an internal tool, I needed to compare two dates, but only the date part, not the time. At first, I thought it would be straightforward, but I realised there are multiple ways to do it, and the results can vary depending on the method used. I tried … Read more >>

Read CSV to Dictionary Using Pandas in Python

pandas csv to dict

Working with CSV files is a common task in data analysis and manipulation. While Pandas DataFrames are great for most operations, sometimes you need to convert your CSV data into a Python dictionary for specific use cases. In my decade-plus experience as a Python developer, I’ve found that knowing how to transform CSV data into … Read more >>

Convert DataFrame To NumPy Array Without Index in Python

DataFrame To NumPy Array

While I was working on a machine learning project, I needed to feed my pandas DataFrame into a model that required NumPy arrays. The challenge was that I needed to convert the DataFrame to a NumPy array without including the index values, as they would skew my model’s predictions. While pandas DataFrames are great for … Read more >>

How to Drop Header Row of Pandas DataFrame?

pandas remove header

When working with data in Pandas, I often encounter situations where the CSV or Excel file I import already has a header row that I don’t want to include in my DataFrame. Other times, I need to remove the column names entirely for specific data processing requirements. In this article, I’ll show you several easy … Read more >>

Create Plots Using Pandas Crosstab() in Python

pandas crosstab

When I was working on a data analysis project, I needed to visualize the relationship between two categorical variables in my dataset. The challenge was finding an efficient way to both tabulate and visualize this relationship in one go. That’s when pandas’ crosstab() function came to my rescue. In this article, I’ll show you how … Read more >>

Python Pandas Write to Excel

pandas to excel

Are you working with data in Python and need to export your analysis results to Excel? I do this almost daily in my data analysis workflow. Pandas makes it incredibly easy to write DataFrames to Excel files with just a few lines of code. In this tutorial, I’ll show you multiple ways to write Pandas … Read more >>

How to Get the Current Date in Milliseconds Using TypeScript

Get current date in milliseconds in typescript

While working as a Typescript developer on time-sensitive applications, I recently faced an issue where I needed to accurately capture and manipulate timestamps. It’s one of those settings that can make a big difference, especially when logging events, syncing data, or tracking real-time user actions. In this tutorial, I will explain how to get the … Read more >>

Reshape Arrays in NumPy

python reshape

Recently, I was working on a data science project where I needed to transform a flat array into a multi-dimensional structure for matrix operations. The issue is, reshaping arrays manually can be tedious and error-prone. So we need NumPy’s useful reshaping capabilities. In this article, I’ll cover several simple ways you can use to reshape … Read more >>

51 Python Programs

51 PYTHON PROGRAMS PDF FREE

Download a FREE PDF (112 Pages) Containing 51 Useful Python Programs.

pyython developer roadmap

Aspiring to be a Python developer?

Download a FREE PDF on how to become a Python developer.

Let’s be friends

Be the first to know about sales and special discounts.