Integrating the Python connector with NumPy - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Integrating the Python connector with NumPy

Following is an example of integrating the Python connector with NumPy.

>>> import numpy cursor.execute("select * from book") result: numpy.ndarray = cursor.fetch_numpy_array() print(result)

Following is the result.

[['One Hundred Years of Solitude' 'Gabriel García Márquez'] ['A Brief History of Time' 'Stephen Hawking']]