A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
import cx_Oracle | |
import pandas | |
connection = cx_Oracle.connect('username/pwd@host:port/dbname') | |
def read_query(connection, query): | |
cursor = connection.cursor() | |
try: | |
cursor.execute( query ) | |
names = [ x[0] for x in cursor.description] |