0

I am on a project where I call an API and I want to make statistics with the data returned. It returns a big .json object. As that is not possible to flatten, and I am not interested on all the data returned either, I want to parse only certain keys. I have thought of parsing and then creating a well structured json myself, and from there work with it with panda (I am coding this with Python)

Would this be a good approach? Is it even necessary to create a new .json structure to hold the parsed data?

gnat
20.5k29 gold badges117 silver badges308 bronze badges
asked Feb 15, 2016 at 11:34
2
  • that approach seems perfectly fine to me Commented Feb 15, 2016 at 16:49
  • I think I will go for dictionaries, as I can fill them with the variables I need and I don't need to create a .json file. My main concern is to avoid creating any file or database. I just want to query the API database and show the statistics without creating a database or a file. Commented Feb 16, 2016 at 2:12

1 Answer 1

-2

what i would do is look for the interesting data and make tables and colums in a database accordingly, then parse the data the the database. you can then leverage the power of SQL the get your analytics data

answered Feb 15, 2016 at 13:21
4
  • I was thinking that i do not want to create another database, as i am getting The data out of queries made to the system that provides the API, that already has a database. Commented Feb 15, 2016 at 13:25
  • Maybe hold the data of the query on a dictionary object would be a better choice ? Commented Feb 15, 2016 at 13:30
  • in that case take a look at LINQ, its for c# but there must be python implementations somewhere. LINQ has the ability to query arrays and dictionary's much like SQL. code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b Commented Feb 15, 2016 at 16:17
  • This doesn't answer the question. Commented Feb 23, 2016 at 5:58

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.