“Success today requires the agility and drive to constantly rethink, reinvigorate, react, and reinvent” – Bill Gates
Is it possible to read data from Github ? “Yes”
So, for example, to read in the dataset called ‘Iris.csv‘ hosted on the machinelearningmasteryindia repository, what we need to do is to get the link to the raw file and then run the code below. The screenshots show how to obtain the raw link.
Below is the example, How to import data from Github :
#Read data from Github import pandas as pd url ="https://raw.githubusercontent.com/machinelearningmasteryindia/python/master/Iris.csv" df = pd.read_csv(url, error_bad_lines=False)
First step is to login to your GitHub Account and follow below steps :
Step 1 :
List of datasets published on my Github
Note : Copy the url path from step 3 and use in python code as mentioned above to import the data from Github.