3 ms·
It can be, but what's ensuring that format when you read in a JSON file? JSON is one of the formats Pandas can read, but it has to be structured in a format the
by goatlover 5y ago
It can be, but what's ensuring that format when you read in a JSON file? JSON is one of the formats Pandas can read, but it has to be structured in a format the python library can read in as tabular data. Excel would have the same issue as would any program that is consuming tabular data. At least with CSVs, you know the data is tabular.
- cogman10 5y ago> It can be, but what's ensuring that format when you read in a JSON file? What's ensuring the format of data in a CSV file? Format comes from the same place it comes from for CSV. It's part of whatever data contract you are making with whatever system is providing the data. If someone shoves YAML into a Json file you've got problems, just like you have problems if someone starts talking about cars when you expected a file about airplanes. At some point, you've got to turn file data into application data regardless of format. CSV offers no help in shaping the data and has a bunch of footguns to boot. > JSON is one of the formats Pandas can read, but it has to be structured in a format the python library can read in as tabular data. Pandas is highly flexible in it's ability to read in Json data, What I showed would be trivially loadable by Pandas, so would other formats (including more traditional JSON data). Turning structured data into tabular data is trivial. What isn't trivial is turning tabular data into structured data.