Python vs.
Excel Function Reference
A side-by-side comparative guide of common analytical expressions and workflows
This document outlines 21 staple operations mapped across Microsoft Excel and Python (using native structures or
the industry-standard pandas and numpy libraries).
FUNCTION EXCEL PYTHON NOTES / KEY
CATEGORY
PURPOSE EXPRESSION COUNTERPART DIFFERENCES
Math & Agg. Sum a range of =SUM(A1:A10) sum(iterable) Python's standard sum
values works on iterables.
df['col'].sum()
Pandas handles entire
database columns
natively.
Math & Agg. Calculate average =AVERAGE(A1:A10) [Link]() Python requires the
statistics module or a
df['col'].mean()
DataFrame/Series
structure to run arithmetic
means.
Math & Agg. Count numeric =COUNT(A1:A10) len(iterable) len() includes missing/null
items values. Pandas .count()
df['col'].count()
strictly monitors non-null
elements matching Excel
behavior.
Math & Agg. Find maximum =MAX(A1:A10) max(iterable) Functionally identical
value operations across both
df['col'].max()
environments.
Math & Agg. Find minimum =MIN(A1:A10) min(iterable) Functionally identical
value operations across both
df['col'].min()
environments.
Logical Conditional logic =IF(A1>10, if/else block Excel utilizes inline
"Yes", "No") structural statements,
[Link](cond, y, n)
whereas Python leans on
block conditions or vector
operations.
Logical Error handling =IFERROR(A1/B1, try/except block Python isolates
0) exceptions via structural
[Link](0)
blocks or selectively fills
missing values via data
structures.
Python & Excel Function Reference Guide Page 1 of 3
FUNCTION EXCEL PYTHON NOTES / KEY
CATEGORY
PURPOSE EXPRESSION COUNTERPART DIFFERENCES
Logical Check all =AND(A1>0, and Python uses the textual
conditions B1<10) keyword for scalar logical
& (for series)
checking, and bitwise
operators for vectors.
Logical Check any =OR(A1>0, B1<10) or Python uses the textual
condition keyword for scalar logical
| (for series)
checking, and bitwise
pipes for vectors.
Text Change to =UPPER(A1) [Link]() Excel wraps the object in
uppercase a function wrapper.
df['col'].[Link]()
Python calls built-in
methods directly from
object namespaces.
Text Change to =LOWER(A1) [Link]() Follows the standard
lowercase object-oriented string
df['col'].[Link]()
method rule in Python.
Text Join text strings =CONCAT(A1, B1) " ".join([a, b]) Python merges strings
cleanly using native string
a + b
joins or standard
mathematical addition
operators.
Text Extract from left =LEFT(A1, 3) string[:3] Python handles this
naturally via positional
df['col'].str[:3]
slicing configurations
instead of named
functions.
Text Extract from right =RIGHT(A1, 3) string[-3:] Python relies on negative
sequence indices to trace
df['col'].str[-3:]
properties from the back
of the element string.
Text Find character =LEN(A1) len(string) Identical analytical
length behavior across both
df['col'].[Link]()
standard structures.
Text Strip whitespace =TRIM(A1) [Link]() Excel simplifies duplicate
inner spacings; Python
df['col'].[Link]()
strictly targets leading
and trailing boundaries.
Python & Excel Function Reference Guide Page 2 of 3
FUNCTION EXCEL PYTHON NOTES / KEY
CATEGORY
PURPOSE EXPRESSION COUNTERPART DIFFERENCES
Lookup / Ref. Vertical table =VLOOKUP(k, rng, [Link]() Python approaches
lookup c, 0) relational joins through
df['col'].map()
unified structured merge
properties rather than
single line fetches.
Lookup / Ref. Dynamic matrix =XLOOKUP(k, lkp, [Link][] Python yields flexible
lookup rtn) results directly using
robust label-based vector
index filtering
configurations.
Date & Time Current system =TODAY() [Link]() Python isolates current
date calendar dates by calling
structural imports from
the native datetime
module.
Data Cleaning Drop duplicate rows Menu -> Remove df.drop_duplicates() Built implicitly into UI
Duplicates settings for Excel;
handled via individual
immutable or mutable
programmatic steps in
Python.
Data Cleaning Filter records Menu -> Filter df[df['col'] == val] Excel shifts layout rules
to hide visuals
dynamically; Python
explicitly slices and
allocates matching
boolean masks.
Core Paradigm Shift
When moving workflows from spreadsheets to programmatic notebooks, remember these core structural differences:
• Excel is cell-oriented: Operations explicitly focus on localized layout definitions, coordinates (e.g., A1), and single
formula cells dragged down columns.
• Python is vector/object-oriented: Operations target whole series, arrays, or objects concurrently. Actions belong to
data components explicitly (e.g., .upper() is built directly into the text data itself).
Python & Excel Function Reference Guide Page 3 of 3