Series Posts

Conceptual Python for Java Developers: From Streams to Tensors

Part 0: Python for Java Developers: From Streams to Tensors

A 10-part, example-driven Python series for seasoned Java and C# developers moving into data science, ML and AI. Follow Arjun, a Java architect pulled into a fraud-detection ML project, from culture shock to PyTorch.

Conceptual Python for Java Developers: From Streams to Tensors

Part 1: "The Culture Shock" — Names, Objects and the Runtime

Arjun's first Python code review goes badly. We cover how Python executes code, why variables are names bound to objects, mutability and aliasing, is vs ==, truthiness, numeric surprises, modules, and a proper project setup with uv.

Conceptual Python for Java Developers: From Streams to Tensors

Part 2: "Collections Without Ceremony" — Lists, Dicts, Sets and Comprehensions

The Streams API, translated. Lists, tuples, dicts and sets; slicing and unpacking; comprehensions as the idiomatic map/filter/collect; sorting with keys; and the collections module — Counter, defaultdict, deque — applied to transaction data.

Conceptual Python for Java Developers: From Streams to Tensors

Part 7: "Thinking in Arrays" — NumPy, Vectorisation and Broadcasting

Why the for loop is the enemy of numeric Python. The ndarray and its memory model, dtypes, vectorised operations, axes, boolean masks, broadcasting rules, views vs copies, NaN handling, random generators, and cosine-similarity search from scratch.

Conceptual Python for Java Developers: From Streams to Tensors

Part 8: "DataFrames for SQL Minds" — pandas in Practice

pandas explained through SQL. Series, DataFrames and the Index; selection with loc and iloc; filtering; groupby as GROUP BY and transform as a window function; merge as JOIN; time series and rolling windows; missing data; Copy-on-Write; and building a fraud feature table.