NVIDIA / NVIDIA/cudf

[BUG] Reading JSON file saved from Series fails

Open
#6,505 8 comments 0 reactions 0 assignees View on GitHub
bug cuIO libcudf Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Describe the bug**
Reading a JSON file created from a Series `.to_json(path, orient='records', lines=True)` call leads to a `Input data is not a valid JSON file` when trying to read with `.read_json(path, orient='records', lines=True)` (with or without `engine='cudf'` parameter).

**NOTE**: this is only a problem when saving Series in this format -- DataFrame objects are saved properly.

**Steps/Code to reproduce bug**
```
cudf.Series([1,2,3,4,5]).to_json('sample.json', lines=True, orient='records')

cudf.read_json('sample.json', lines=True, orient='records')
```

The output file looks as follows:

```
1
2
3
4
5
```

**Expected behavior**
The file is read back properly and produces a valid `cudf.Series` object.

**Environment overview (please complete the following information)**
- Environment location: Docker
- Method of cuDF install: Docker
- RAPIDS v 0.16 pull from nightly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.