The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Federalist Papers
Has anyone had success in bringing in the federalist papers dataset? The JSON form can be found here: http://ptrckprry.com/course/ssd/data/federalist.json
These are the following steps I have attempted:
- Parse the json into a csv, but the new line character seems to be getting stuck when using read csv
- Using python extension operator configured to a local conda environment. Same result
Regarding point 2 above, in pandas outside of the RM, the dataframe is exactly what I wanted.
For context, I use this in class to show we can use text and the similarity within to classify the author.
These are the following steps I have attempted:
- Parse the json into a csv, but the new line character seems to be getting stuck when using read csv
- Using python extension operator configured to a local conda environment. Same result
Regarding point 2 above, in pandas outside of the RM, the dataframe is exactly what I wanted.
For context, I use this in class to show we can use text and the similarity within to classify the author.
import pandas as pd
URL = "http://ptrckprry.com/course/ssd/data/federalist.json"fed = pd.read_json(URL, lines=True)
fed.head()
0
Best Answer
-
btibert Member, University Professor Posts: 146 GuruThanks, I was actually able to port another file from SAS using Read SAS which did the trick.1
Answers
As a partial answer, have you tried Read Document (after downloading the federalist.json file on your computer) and JSON to Data operators ?
Below, the process.
Hope this helps,
Regards,
Lionel
Scott