I am trying to download data from a csv file in github to a data framecode:import pandas as pdurl = "https://github.com/lazyprogrammer/machine_learning_examples/blob/master/linear_regression_class/data_2d.csv"r = requests.get(url+file)pd.read_csv(url,names = ['X1','X2','y'])
Instead of loading file data it seems that the html page data is stored in the dataframe:enter image description here
Best Answer
try this:
import pandas as pdurl = "https://github.com/lazyprogrammer/machine_learning_examples/blob/master/linear_regression_class/data_2d.csv"df = pd.read_csv(url,index_col=0,parse_dates=[0])print df.head(5)