Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added meta for read_json and test #4588

Merged
merged 2 commits into from
May 1, 2019
Merged

added meta for read_json and test #4588

merged 2 commits into from
May 1, 2019

Conversation

abhinavralhan
Copy link
Contributor

@abhinavralhan abhinavralhan commented Mar 13, 2019

  • Tests added / passed
  • Passes flake8 dask

Closes #4553

@abhinavralhan
Copy link
Contributor Author

@TomAugspurger i raised a new PR since previous one got messy. please let me know if this is okay. thanks for patience.

value = val if not val % 2 else float('NaN')
json_string['dtype' + str(key)] = [val, value]
with pytest.raises(ValueError):
df = dd.read_json(json_string, orient=orient, meta=pd.DataFrame(json_string)[:0])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears tests are failing because you're passing a dictionary to dd.read_json (see https://travis-ci.org/dask/dask/jobs/505965158#L1796), which is expecting the location of the json file(s) to read (e.g. dd.read_json('path/to/myfile.json'))

You might try looking at dask/dataframe/io/tests/test_json.py to see how dd.read_json is used in the existing tests.

@jcrist jcrist self-assigned this Apr 30, 2019
@martindurant
Copy link
Member

@abhinavralhan , may I push to your branch?

@jcrist jcrist merged commit f96f14b into dask:master May 1, 2019
jorge-pessoa pushed a commit to jorge-pessoa/dask that referenced this pull request May 14, 2019
* added meta for read_json and test

* fixups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support meta= keyword in dd.read_json
4 participants