Skip to content

Conversation

twoertwein
Copy link
Member

BytesIO's getvalue() is the same as seek(0) followed by read() if the buffer is not used in any other place (getvalue doesn't change the position within the buffer). getvalue is slightly faster then seek+read.

@jreback jreback added Clean IO Stata read_stata, to_stata labels Jan 19, 2021
@jreback jreback added this to the 1.3 milestone Jan 19, 2021
@jreback jreback merged commit 91433f8 into pandas-dev:master Jan 19, 2021
@jreback
Copy link
Contributor

jreback commented Jan 19, 2021

thanks @twoertwein

@twoertwein twoertwein deleted the getvalue branch January 19, 2021 21:19
nofarm3 pushed a commit to nofarm3/pandas that referenced this pull request Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean IO Stata read_stata, to_stata

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants