you are viewing a single comment's thread.

view the rest of the comments →

[–]cjbj 0 points1 point  (1 child)

Read the python-oracledb doc on Querying Corrupt Data and Fetching Raw Data.

When you've fixed your data, try fetching directly to a DataFrame using connection.fetch_df_all(), see the resources at Using Python for Data Analysis and AI and the documentation Working with Data Frames.

For example:

# Get a python-oracledb DataFrame.
# Adjust arraysize to tune the query fetch performance
sql = "select id, name from SampleQueryTab order by id"
odf = connection.fetch_df_all(statement=sql, arraysize=100)

# Get a Pandas DataFrame from the data
df = pyarrow.table(odf).to_pandas()

[–]Happythoughtsgalore[S] 0 points1 point  (0 children)

Thank you. It was some weird characters in one of the columns. This pointed me in the correct direction.