Programming | Towards Data Science https://towardsdatascience.com/category/programming/ Publish AI, ML & data-science insights to a global community of data professionals. Mon, 15 Dec 2025 17:42:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 https://towardsdatascience.com/wp-content/uploads/2025/02/cropped-Favicon-32x32.png Programming | Towards Data Science https://towardsdatascience.com/category/programming/ 32 32 Geospatial exploratory data analysis with GeoPandas and DuckDB https://towardsdatascience.com/geospatial-exploratory-data-analysis-with-geopandas-and-duckdb/ Mon, 15 Dec 2025 13:17:00 +0000 https://towardsdatascience.com/?p=607897 In this article, I’ll show you how to use two popular Python libraries to carry out some geospatial analysis of traffic accident data within the UK. I was a relatively early adopter of DuckDB, the fast OLAP database, after it became available, but only recently realised that, through an extension, it offered a large number […]

The post Geospatial exploratory data analysis with GeoPandas and DuckDB appeared first on Towards Data Science.

]]>
Stop Writing Spaghetti if-else Chains: Parsing JSON with Python’s match-case https://towardsdatascience.com/stop-writing-spaghetti-if-else-chains-parsing-json-with-pythons-match-case/ Sun, 14 Dec 2025 10:24:00 +0000 https://towardsdatascience.com/?p=607903 Introduction If you work in data science, data engineering, or as as a frontend/backend developer, you deal with JSON. For professionals, its basically only death, taxes, and JSON-parsing that is inevitable. The issue is that parsing JSON is often a serious pain. Whether you are pulling data from a REST API, parsing logs, or reading […]

The post Stop Writing Spaghetti if-else Chains: Parsing JSON with Python’s match-case appeared first on Towards Data Science.

]]>
EDA in Public (Part 1): Cleaning and Exploring Sales Data with Pandas https://towardsdatascience.com/eda-in-public-part-1-cleaning-exploring-sales-data-with-pandas/ Fri, 12 Dec 2025 13:20:00 +0000 https://towardsdatascience.com/?p=607886 Hey everyone! Welcome to the start of a major data journey that I’m calling “EDA in Public.” For those who know me, I believe the best way to learn anything is to tackle a real-world problem and share the entire messy process — including mistakes, victories, and everything in between. If you’ve been looking to level up […]

The post EDA in Public (Part 1): Cleaning and Exploring Sales Data with Pandas appeared first on Towards Data Science.

]]>
Drawing Shapes with the Python Turtle Module https://towardsdatascience.com/drawing-shapes-with-the-python-turtle-module/ Thu, 11 Dec 2025 15:00:00 +0000 https://towardsdatascience.com/?p=607880 A step-by-step tutorial that explores the Python Turtle Module

The post Drawing Shapes with the Python Turtle Module appeared first on Towards Data Science.

]]>
Build and Deploy Your First Supply Chain App in 20 Minutes https://towardsdatascience.com/build-and-deploy-your-first-supply-chain-app-in-20-minutes/ Thu, 04 Dec 2025 15:00:00 +0000 https://towardsdatascience.com/?p=607808 A factory operator that discovered happiness by switching from notebook to streamlit - (Image Generated with GPT-5.1 by Samir Saci)

The post Build and Deploy Your First Supply Chain App in 20 Minutes appeared first on Towards Data Science.

]]>
How to Generate QR Codes in Python https://towardsdatascience.com/how-to-generate-qr-code-in-python/ Tue, 02 Dec 2025 12:30:00 +0000 https://towardsdatascience.com/?p=607782 A beginner-friendly tutorial exploring the Python "qrcode" Package

The post How to Generate QR Codes in Python appeared first on Towards Data Science.

]]>
Implementing the Rock Paper Scissors Game in Python https://towardsdatascience.com/implementing-the-rock-paper-scissors-game-in-python/ Thu, 27 Nov 2025 12:30:00 +0000 https://towardsdatascience.com/?p=607740 A beginner-friendly Python tutorial using conditionals and the random module

The post Implementing the Rock Paper Scissors Game in Python appeared first on Towards Data Science.

]]>
How to Implement Randomization with the Python Random Module https://towardsdatascience.com/implementing-randomisation-with-the-python-random-module/ Mon, 24 Nov 2025 21:30:00 +0000 https://towardsdatascience.com/?p=607724 Let's generate randomness in our code’s outputs

The post How to Implement Randomization with the Python Random Module appeared first on Towards Data Science.

]]>
Javascript Fatigue: HTMX Is All You Need to Build ChatGPT — Part 2 https://towardsdatascience.com/javascript-fatigue-you-dont-need-js-to-build-chatgpt-part-2/ Mon, 17 Nov 2025 19:32:22 +0000 https://towardsdatascience.com/?p=607660 In part 1, we showed how we could leverage HTMX to add interactivity to our HTML elements. In other words, Javascript without Javascript. To illustrate that, we began building a simple chat that would return a simulated LLM response. In this article, we will extend the capabilities of our chatbot and add several features, among […]

The post Javascript Fatigue: HTMX Is All You Need to Build ChatGPT — Part 2 appeared first on Towards Data Science.

]]>
Javascript Fatigue: HTMX Is All You Need to Build ChatGPT — Part 1 https://towardsdatascience.com/javascript-fatigue-you-dont-need-js-to-build-chatgpt/ Mon, 17 Nov 2025 12:30:00 +0000 https://towardsdatascience.com/?p=607639 Building a chatbot (almost) without Javascript, only with Python and HTML.

The post Javascript Fatigue: HTMX Is All You Need to Build ChatGPT — Part 1 appeared first on Towards Data Science.

]]>
Run Python Up to 150× Faster with C https://towardsdatascience.com/make-python-up-to-150x-faster-with-c/ Mon, 10 Nov 2025 19:33:20 +0000 https://towardsdatascience.com/?p=607598 A practical guide to offloading performance-critical code to C without abandoning Python.

The post Run Python Up to 150× Faster with C appeared first on Towards Data Science.

]]>
Let Hypothesis Break Your Python Code Before Your Users Do https://towardsdatascience.com/let-hypothesis-break-your-python-code-before-your-users-do/ Fri, 31 Oct 2025 17:13:39 +0000 https://towardsdatascience.com/?p=607530 Property-based tests that find bugs you didn’t know existed.

The post Let Hypothesis Break Your Python Code Before Your Users Do appeared first on Towards Data Science.

]]>
Python 3.14 and the End of the GIL https://towardsdatascience.com/python-3-14-and-the-end-of-the-gil/ Sat, 18 Oct 2025 14:00:00 +0000 https://towardsdatascience.com/?p=607412 Exploring the opportunities and challenges of a GIL-free Python

The post Python 3.14 and the End of the GIL appeared first on Towards Data Science.

]]>
Beyond Requests: Why httpx is the Modern HTTP Client You Need (Sometimes) https://towardsdatascience.com/beyond-requests-why-httpx-is-the-modern-http-client-you-need-sometimes/ Wed, 15 Oct 2025 19:06:27 +0000 https://towardsdatascience.com/?p=607393 A comprehensive comparison of these two Python libraries

The post Beyond Requests: Why httpx is the Modern HTTP Client You Need (Sometimes) appeared first on Towards Data Science.

]]>
Human Won’t Replace Python https://towardsdatascience.com/human-wont-replace-python/ Tue, 14 Oct 2025 17:39:10 +0000 https://towardsdatascience.com/?p=607381 Why vibe-coding is not a step up from "classic" coding — and why it matters

The post Human Won’t Replace Python appeared first on Towards Data Science.

]]>
Build a Data Dashboard Using HTML, CSS, and JavaScript https://towardsdatascience.com/build-a-data-dashboard-using-html-css-javascript/ Fri, 03 Oct 2025 14:00:00 +0000 https://towardsdatascience.com/?p=607333 A framework-free guide for Python programmers

The post Build a Data Dashboard Using HTML, CSS, and JavaScript appeared first on Towards Data Science.

]]>
Python Can Now Call Mojo https://towardsdatascience.com/python-can-now-call-mojo/ Sun, 21 Sep 2025 14:00:00 +0000 https://towardsdatascience.com/?p=607196 Boost your runtimes with lightning-fast Mojo code

The post Python Can Now Call Mojo appeared first on Towards Data Science.

]]>
How I Built and Deployed an App in 2 days with Lovable, Supabase, and Netlify https://towardsdatascience.com/how-i-built-and-deployed-an-app-in-2-days-with-lovable-supabase-and-netlify/ Thu, 18 Sep 2025 17:30:48 +0000 https://towardsdatascience.com/?p=607180 All ideas can be turned into action in a matter of time now.

The post How I Built and Deployed an App in 2 days with Lovable, Supabase, and Netlify appeared first on Towards Data Science.

]]>
Using Python to Build a Calculator https://towardsdatascience.com/using-python-to-build-a-calculator/ Tue, 16 Sep 2025 18:33:36 +0000 https://towardsdatascience.com/?p=607156 A beginner-friendly Python project to understand conditional statements, loops and recursive functions

The post Using Python to Build a Calculator appeared first on Towards Data Science.

]]>
Implementing the Coffee Machine Project in Python Using Object Oriented Programming https://towardsdatascience.com/implementing-the-coffee-machine-project-in-python-using-object-oriented-programming/ Mon, 15 Sep 2025 18:40:27 +0000 https://towardsdatascience.com/?p=607145 Understanding classes, objects, attributes, and methods

The post Implementing the Coffee Machine Project in Python Using Object Oriented Programming appeared first on Towards Data Science.

]]>