A Professional’s Tutorial to Python Data Types: int, float, string, bool

Outlining fundamental Python data types

Adam Ross Nelson
9 min readSep 17

For an overview of these tutorials, click here (or click the image).

Welcome to first, in a series of tutorials that teach beginner Python specifically for aspiring data scientists. For an overview of these tutorials, click here.

Introduction

In the world of data science (and programming in Python), data types serve an important foundational building block. As we go about our life in the world we encounter data every moment of every day.

However, as we go about our world, we do not usually have a habit of thinking about the type of data or the type of information with which we interact. However, computer programming languages and data science tools are keenly “aware” of this topic.

Implicitly you likely already understand the notion of a typology. We just naturally categorize the tangible world around us . When thinking about a type of matter we distinguish between solids, liquids, and gases. We can distinguish the periodic table by differentiating between metals and non-metals. In biology we know the differences between plants, animals, and mushrooms (over-simplified, but you get the point.

Shows three common typologies. Animals + plants. Solids + liquids + gasses. Also metals + non-metals.
Image Credit: Common typologies. Autor’s illustration created in Canva.

Data types provide a taxonomy for the forms of data we interact with in the digital realm. Computer programming and data science need multiple data-related taxonomies.

The taxonomies demarcate the nature of the data — whether they are numerical, textual, true/false values (boolean), structured, or simple, and so forth. Furthermore, these categorizations govern how we can work with the data. Related these taxonomies also relate to how much memory storage they require.

Solid blue background with numbers, arrow, and blocks (cartoon style) floating around.
Image Credit: Author’s illustration created in Canva.com.

A comprehensive grasp of data types guards against efficient and error-free code. The more well versed current and aspiring data scientists are on how data can be stored, manipulated, and interpreted — the better you can perform your…

Adam Ross Nelson

Ask about my free career course. I mentor new (💫) and aspiring data scientists enter (🚪) and level up (📈) in the field.