{
"total_count": 2316913,
"incomplete_results": false,
"items": [
{
"id": 13737149,
"name": "gremlins.js",
"full_name": "marmelab/gremlins.js",
"owner": {
"login": "marmelab",
"id": 3116319,
"avatar_url": "https://avatars1.githubusercontent.com/u/3116319?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/marmelab",
"html_url": "https://github.com/marmelab",
"followers_url": "https://api.github.com/users/marmelab/followers",
"following_url": "https://api.github.com/users/marmelab/following{/other_user}",
"gists_url": "https://api.github.com/users/marmelab/gists{/gist_id}",
"starred_url": "https://api.github.com/users/marmelab/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marmelab/subscriptions",
"organizations_url": "https://api.github.com/users/marmelab/orgs",
"repos_url": "https://api.github.com/users/marmelab/repos",
"events_url": "https://api.github.com/users/marmelab/events{/privacy}",
"received_events_url": "https://api.github.com/users/marmelab/received_events",
"type": "Organization",
"site_admin": false
},
The above is data from the Github search API. What I am attempting to do is pull certain fields out and insert it into a dataframe.
Using a standard for loop like:
for i in jdata['items']:
print(i['name'] + "\t" + i['html_url'])
prints the data I need, but, its ugly, hard to read, and since I have more things to extract, I am at a stopping point.
url = "https://api.github.com/search/repositories?q={}".format(sTerm)
jdata = requests.get(url).json()
I am using this to get input from the user, and storing the results in jdata.
Dataframes are new to me, and it seems that no matter what I try, it either displays everything in the search results, or nothing. Not sure what I'm doing wrong. (I know I didn't paste any dataframe code, nothing is working, so I figured I'd save everyone the eye cancer.)