Comments (2)
Please note that the default format of the method Dataset.to_json
is JSON-Lines: it passes orient="records", lines=True
to pandas.DataFrame.to_json
. This format is specially useful for large datasets, since unlike regular JSON files, it does not require loading all the data into memory at once, but can be done iteratively by batches.
In order to read this file using the json
library, you should parse line by line:
with open("full_dataset.json", "r") as f:
data = [json.loads(line) for line in f]
len(data)
Maybe we should explain this better in our docs.
from datasets.
Now we explain this better in out docs:
from datasets.
Related Issues (20)
- AttributeError: module 'PIL.Image' has no attribute 'ExifTags'
- Connection Error When Using By-pass Proxies HOT 1
- CI is broken after jax-0.4.27 release: AttributeError: 'jaxlib.xla_extension.DeviceList' object has no attribute 'device'
- load_dataset with data_dir and cache_dir set fail with not supported
- FAISS load to None HOT 1
- add `with_transform` and/or `set_transform` to IterableDataset
- Better document defaults of to_json
- Regression bug: `NonMatchingSplitsSizesError` for (possibly) overwritten dataset
- datasets template guide :: issue in documentation YAML HOT 2
- List of dictionary features get standardized
- [WebDataset] KeyError with user-defined `Features` when a field is missing in an example
- HTTPError 403 raised by CLI convert_to_parquet when creating script branch on 3rd party repos
- Add the option of saving in parquet instead of arrow HOT 2
- Extraction protocol for arrow files is not defined
- irc_disentangle - Issue with splitting data
- Support the deserialization of json lines files comprised of lists HOT 1
- Fail to load "stas/c4-en-10k" dataset since 2.16 version HOT 2
- Add MedImg for streaming HOT 3
- Column order is nondeterministic when loading from JSON
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datasets.