Integrieren des Python-Konnektors mit NumPy
Es folgt ein Beispiel für die Integration des Python-Konnektors in NumPy.
>>> import numpy cursor.execute("select * from book") result: numpy.ndarray = cursor.fetch_numpy_array() print(result)
Das Ergebnis sieht wie folgt aus.
[['One Hundred Years of Solitude' 'Gabriel García Márquez'] ['A Brief History of Time' 'Stephen Hawking']]