-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decode bytes to str with Pandas reader #57
Comments
This is what I exactly need!! |
This is what I exactly need!! an easy way to do is: it works but i don't if there are side effects |
Hello zjc5415, This hasn't solved the issue for me. I gert an error saying that 'ascii' codec can't decode byte”. Is there another way to do it ? THnaks |
in my case it is python3.6。 you may debug it line by line and check the reason。 |
It would be nice if there was a setting which allowed to get data as
str
, rather thanbytes
, in Python 3 when used withpandas=True
. I'm aware of the discussion in #35 and related example of a custom reader here, so it's definitely possible to achieve this. It just seems like there are quite a few things you need to overwrite to handle all the cases, which makes it very easy to do it wrong. If this is not going to be officially supported out of the box, then at least a recipe withQReader
implementation which handles all the possible cases would be extremely helpful.I feel like Python 3 users would prefer to get
str
overbytes
in vast majority of cases, and using pandas DataFrame is essential in most scientific applications. If anything, at first I was naively expecting that passingencoding
toQConnection
would make it do exactly that. So if you don't pass any encoding it would give you bytes, but if you do pass the encoding it would give you decoded strings.Thanks!
The text was updated successfully, but these errors were encountered: