Skip to content

Commit

Permalink
Call seek if it is available
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Oct 26, 2021
1 parent d462ea8 commit 64d9203
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandas_streaming/df/dataframe.py
Expand Up @@ -288,7 +288,8 @@ def fct2(args=args, chunksize=chunksize, kw=kwargs.copy()):
**kwargs_create)

def fct3(st=st, args=args, chunksize=chunksize, kw=kwargs.copy()):
st.seek(0)
if hasattr(st, 'seek'):
st.seek(0)
for r in pandas.read_json(
st, *args, chunksize=chunksize, nrows=chunksize,
lines=True, **kw):
Expand Down

0 comments on commit 64d9203

Please sign in to comment.