mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-05-05 22:38:31 +00:00
Merge pull request #2166 from BraxtonFair/patch-1
Write a bit better code
This commit is contained in:
commit
46d36132cd
@ -150,9 +150,8 @@ ggplot(aes(x="age",y="weight"), data=pets) + geom_point() + labs(title="pets")
|
|||||||
url = "https://raw.githubusercontent.com/e99n09/R-notes/master/data/hre.csv"
|
url = "https://raw.githubusercontent.com/e99n09/R-notes/master/data/hre.csv"
|
||||||
r = requests.get(url)
|
r = requests.get(url)
|
||||||
fp = "hre.csv"
|
fp = "hre.csv"
|
||||||
f = open(fp, "wb")
|
with open(fp, "wb") as f:
|
||||||
f.write(r.text.encode("UTF-8"))
|
f.write(r.text.encode("UTF-8"))
|
||||||
f.close()
|
|
||||||
|
|
||||||
hre = pd.read_csv(fp)
|
hre = pd.read_csv(fp)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user