Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chris Jewell
covid19uk
Commits
b1d1152c
Commit
b1d1152c
authored
Apr 14, 2021
by
Chris Jewell
Browse files
Remove redundant JSON/un-JSON transformation.
parent
876ee171
Changes
1
Hide whitespace changes
Inline
Side-by-side
covid/data/case_data.py
View file @
b1d1152c
...
...
@@ -53,7 +53,7 @@ class CasesData:
print
(
"Attempting to download..."
,
end
=
""
,
flush
=
True
)
response
=
requests
.
get
(
url
)
content
=
json
.
loads
(
response
.
content
)
df
=
pd
.
read_json
(
json
.
dumps
(
content
[
"body"
])
)
df
=
pd
.
DataFrame
.
from_dict
(
content
[
"body"
])
print
(
"Success"
,
flush
=
True
)
return
df
except
(
requests
.
ConnectionError
,
requests
.
RequestException
)
as
e
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment