Write a bit better code

This commit is contained in:
Braxton Fair 2016-02-28 20:33:57 -06:00
parent 326fa410fa
commit ecba01b4b1

View File

@ -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"
r = requests.get(url)
fp = "hre.csv"
f = open(fp, "wb")
f.write(r.text.encode("UTF-8"))
f.close()
with open(fp, "wb") as f:
f.write(r.text.encode("UTF-8"))
hre = pd.read_csv(fp)