3
Data Types
The data type of a pd.Series allows you to dictate what kind of elements may or may not be stored. Data types are important for ensuring data quality, as well as enabling high-performance algorithms in your code. If you have a data background working with databases, you more than likely are already familiar with data types and their benefits; you will find types like TEXT, INTEGER, and DOUBLE PRECISION in pandas just like you do in a database, albeit under different names.
Unlike a database, however, pandas offers multiple implementations of how a TEXT, INTEGER, and DOUBLE PRECISION type can work. Unfortunately, this means, as an end user, that you should at least have some understanding of how the different data types are implemented ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access