© Gayathri Rajagopalan 2021
G. RajagopalanA Python Data Analyst’s Toolkithttps://doi.org/10.1007/978-1-4842-6399-0_3

3. Regular Expressions and Math with Python

Gayathri Rajagopalan1  
(1)
Bangalore, India
 

In this chapter, we discuss two modules in Python: re, which contains functions that can be applied for regular expressions, and SymPy, for solving mathematical problems in algebra, calculus, probability, and set theory. Concepts that we will learn in this chapter, like searching and replacing strings, probability, and plotting graphs, will come in handy for subsequent chapters, where we cover data analysis and statistics.

Regular expressions

A regular expression is a pattern containing both characters (like letters and digits) and metacharacters ...

Get A Python Data Analyst’s Toolkit: Learn Python and Python-based Libraries with Applications in Data Analysis and Statistics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.