Function

SQL

SQL - REVERSE() Function

• The REVERSE() function inverts character order in strings, useful for palindrome detection, data validation, and specialized sorting operations

Read more →
SQL

SQL - ROW_NUMBER() Function

ROW_NUMBER() is a window function that assigns a unique sequential integer to each row within a partition of a result set. The numbering starts at 1 and increments by 1 for each row, regardless of…

Read more →
SQL

SQL - RANK() Function

The RANK() function assigns a rank to each row within a result set partition. When two or more rows have identical values in the ORDER BY columns, they receive the same rank, and subsequent ranks…

Read more →
SQL

SQL - NTILE() Function

NTILE() is a window function that distributes rows into a specified number of ordered groups. Each row receives a bucket number from 1 to N, where N is the number of groups you define.

Read more →
SQL

SQL - NULLIF() Function

NULLIF() accepts two arguments and compares them for equality. If the arguments are equal, it returns NULL. If they differ, it returns the first argument. The syntax is straightforward:

Read more →
SQL

SQL - DENSE_RANK() Function

DENSE_RANK() is a window function that assigns a rank to each row within a partition of a result set. The key characteristic that distinguishes it from other ranking functions is its handling of…

Read more →
SQL

SQL - COUNT() as Window Function

• COUNT() as a window function calculates running totals and relative frequencies without collapsing rows, unlike its aggregate counterpart which groups results into single rows per partition

Read more →
R

R - subset() Function with Examples

• The subset() function provides an intuitive way to filter rows and select columns from data frames using logical conditions without repetitive bracket notation or the $ operator

Read more →
R

R purrr - map() Function with Examples

The purrr package revolutionizes functional programming in R by providing a consistent, predictable interface for iteration. While base R’s lapply() works, map() offers superior error handling,…

Read more →
R

R - aggregate() Function

• The aggregate() function provides a straightforward approach to split-apply-combine operations, computing summary statistics across grouped data without external dependencies

Read more →
Engineering

Python - pow() Function

Python provides multiple ways to calculate powers, but the built-in pow() function stands apart with capabilities that go beyond simple exponentiation. While most developers reach for the **

Read more →
Engineering

Python - divmod() Function

Python’s divmod() function is one of those built-ins that many developers overlook, yet it solves a common problem elegantly: getting both the quotient and remainder from a division operation in…

Read more →
Python

PySpark - NTILE Window Function

NTILE is a window function that divides an ordered dataset into N roughly equal buckets or tiles, assigning each row a bucket number from 1 to N. Think of it as automatically creating quartiles (4…

Read more →
Pandas

Pandas - Apply Function to Column

• The apply() method transforms DataFrame columns using custom functions, lambda expressions, or built-in functions, offering more flexibility than vectorized operations for complex transformations

Read more →
Excel

How to Use UNIQUE Function in Excel

Excel’s UNIQUE function arrived with Excel 365 and Excel 2021, finally giving users a native way to extract distinct values without resorting to advanced filters or convoluted helper column formulas….

Read more →
Excel

How to Use SORT Function in Excel

The SORT function revolutionizes how you handle data ordering in Excel. Available in Excel 365 and Excel 2021, it creates dynamic sorted ranges that update automatically when source data…

Read more →
Excel

How to Use SORTBY Function in Excel

The SORTBY function arrived in Excel 365 and Excel 2021 as part of Microsoft’s dynamic array revolution. Unlike clicking the Sort button in the Data tab, SORTBY creates a formula-based sort that…

Read more →
Excel

How to Use SEQUENCE Function in Excel

The SEQUENCE function generates arrays of sequential numbers based on parameters you specify. Available in Excel 365 and Excel 2021, it’s one of the dynamic array functions that fundamentally changed…

Read more →
Excel

How to Use MEDIAN Function in Excel

The MEDIAN function returns the middle value in a set of numbers. Unlike AVERAGE, which sums all values and divides by count, MEDIAN identifies the central point where half the values are higher and…

Read more →
Excel

How to Use LET Function in Excel

Excel’s LET function fundamentally changes how we write formulas. Introduced in 2020, LET allows you to assign names to calculation results within a formula, then reference those names instead of…

Read more →
Excel

How to Use LAMBDA Function in Excel

Excel’s LAMBDA function, introduced in 2021, fundamentally changes how we write formulas. Instead of copying complex formulas across hundreds of cells or resorting to VBA macros, you can now create…

Read more →
Python

How to Apply a Function in Polars

Polars has rapidly become the go-to DataFrame library for Python developers who need speed. Built on Rust with a lazy execution engine, it outperforms pandas in most benchmarks by significant…

Read more →