Open Syndorik opened 1 year ago
I'm not sure if I correctly understood your issue, but I tested the code below where I have two columns in my table "varchar_val" contains data of type "varchar" and "text_val" which hold text values. `import connectorx as cx
query = "SELECT text_val, varchar_val FROM test"
conn = "connectionuri....."
print(cx.read_sql(conn, query)["varchar_val"].dtypes)
print(cx.read_sql(conn, query)["text_val"].dtypes)
which returns "object" for both, this is the correct behaviour of pandas.
@mbarki-mohamed this is what @Syndorik meant
the data inside the column is bytes, not str type
@mbarki-mohamed is it something that is going to be fixed?
Sorry I totally forgot that issue, the issues deals with what @jvovk describe. The data inside the column are considered as bytes instead of strings
I'm sorry to reopen the subject, but Is there any work on that planned?
What language are you using?
Python
What version are you using?
0.3.1
What database are you using?
MySQL
What dataframe are you using?
Pandas
Can you describe your bug?
When querying a column from a table which has the format type
text
, values are not of typestr
inside the dataframe but of typebytes
. This behaviour doesn't happen onvarchar
typesWhat are the steps to reproduce the behavior?
Query a table with text fromat, and check the type of the values (is bytes, should be string)
Example query / code
What is the error?
No error, strange behavior I wanted to note, that this doesn't happen with
pd.read_sql