[go: nahoru, domu]

Skip to content

Commit

Permalink
Workaround for incremental in read_json. (apache#13489)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwb committed Dec 12, 2020
1 parent ee911d2 commit 302de87
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sdks/python/apache_beam/dataframe/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def read_fwf(path, *args, **kwargs):


def read_json(path, *args, **kwargs):
if 'nrows' in kwargs:
raise NotImplementedError('nrows not yet supported')
elif kwargs.get('lines', False):
# Work around https://github.com/pandas-dev/pandas/issues/34548.
kwargs = dict(kwargs, nrows=1 << 63)
return _ReadFromPandas(
pd.read_json,
path,
Expand Down

0 comments on commit 302de87

Please sign in to comment.