O'Reilly logo

MySQL for Python by Albert Lukaszewski, PhD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. String Functions

We have already seen how we can pass the burden of certain processes onto the database server. The MySQL aggregate functions are optimized for their tasks. This reduces the amount of I/O passed back to Python and results in less data for our programs to process. In addition to the aggregate functions, MySQL also provides other functions that help us process data before it is returned to Python.

In this chapter, we will see:

  • The way MySQL allows us to combine strings and return the single, resulting value
  • How to extract part of a string or the location of a part, thus saving on processing
  • How to convert cases of results

All of this can be done through MySQL for Python. After we have seen the common ways to juggle strings ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required