You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In short, consider moving to a custom implementation of the Reader protocol (or what Pandas would refer to as a "file-like object") in places where StringIO or BytesIO are used.
(Update: title, description, and first comment updated to include both StringIO and BytesIO.)
The text was updated successfully, but these errors were encountered:
I am at least a bit curious the degree to which this is preferable to just using StringIO/BytesIO. Wouldn't mind a bit of discussion and references here if possible before we proceed with anything.
This is one of those things that makes my head tilt like a dog. Why not use a BytesIO when it's a bytes object?
Probably only because I wasn't thinking too hard about it, and the Pandas documentation for read_csv specifically cites StringIO as an example of a file-like. So it put a valid solution in my head, and I just went with it.
I probably should change that in the #566 review (and then update the issue title and description here; I think the general question probably still applies).
robertbartel
changed the title
Look at replacing StringIO usage with simple Reader implementation
Look at replacing StringIO/BytesIO usage with simple Reader implementation
May 10, 2024
See here for original suggestion.
In short, consider moving to a custom implementation of the Reader protocol (or what Pandas would refer to as a "file-like object") in places where StringIO or BytesIO are used.
(Update: title, description, and first comment updated to include both StringIO and BytesIO.)
The text was updated successfully, but these errors were encountered: