Read CSV from a Web Page


import pandas as pd
# the link is taken from right-clicking the csv file on a web page and 'copy link address'
footballData = pd.read_csv("https://datahub.io/sports-data/english-premier-league/r/season-1819.csv")
# print(footballData)

# renaming two columns names; the inplace changes the original
footballData.rename(columns={"FTHG": "Home", "FTAG": "Abroad"}, inplace=True)
print(footballData)
   

    

Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

The Basic Structure of a Full-Stack Web App

Unlocking Web Design: A Guide to Mastering CSS Layout Modes