Dataframe to postgresql - Saving the dataframe to memory using StringIO
On 2020-10-22, Chris Angelico <rosuav at gmail.com> wrote:
> On Fri, Oct 23, 2020 at 12:15 AM Shaozhong SHI <shishaozhong at gmail.com> wrote:
>> What should I know or watch out if I decide to move from Python 2.7
>> to Python 3?
> Key issues? Well, for starters, you don't have to worry about whether
> your strings are Unicode or not. They just are, unless you explicitly
> need them to be bytes.
The 'bytes' thing is important. If you use serial ports, sockets, or
anything else that's raw bytes, that code will need to be examined
The usage of the 'bytes' type in 3.x isn't at all like 2.x:
'[0, 1, 2]'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: string argument without an encoding
Moving from 2.x to 3.x isn't too bad, but trying to maintain
compatiblity with both is painful. At this point, I would probably
just abandon 2.x.