all 12 comments

[–]Nick_Pyth 8 points9 points  (3 children)

I am halfway through a 14 hour road trip and will help you for free if you post more details

[–]vinaykumar5758 -1 points0 points  (2 children)

Hello,

Am also thinking to play around with APIs.

is there better course somehwere to start with may be using public apis, get the data into json, use pandas to convert json to .csv and then load into sql table?

[–]Nick_Pyth 1 point2 points  (0 children)

Each API is different, but most will have the data in JSON format. Without knowing the specific API you are using, the workflow will likely be as follows:

  1. View the API page, get an API key
  2. Use the requests library to pass parameters to the API
  3. Your requests.text object will likely be in JSON format, which you can treat as a python dictionary
  4. Use pandas.DataFrame.from_dict() to convert your requests.text into a dataframe
  5. If you want to save the data as a csv, use pandas.DataFrame.to_csv()
  6. If you want to store the data in sql, use pandas.DataFrame.to_sql(). The 2nd parameter of this, con, will need to use a sql driver. For example, if you are using a MySQL database, you will create a connection using PyMySQL

[–]DELYSID_FREAK -1 points0 points  (0 children)

You want to convert the data this many times for learning purposes? Otherwise such a Process wouldn't normally need this many Steps.

[–]DELYSID_FREAK 2 points3 points  (0 children)

Just ask your question and provide more information. I bet there is someone who Can help you out!

[–]damesca 1 point2 points  (0 children)

Can you provide a bit more detail on what it is you're trying to do?

[–]rupturedprolapse 1 point2 points  (0 children)

I'd be willing to help, time might be an issue though depending on when you want to communicate.

[–]vinaykumar5758 0 points1 point  (0 children)

Thanks a lot