import pandas as pd
daf = pd.read_html('https://github.com/justmarkham/DAT8/blob/master/data/beer.txt' )

*this would extract the dataset from the mentioned url but I am facing trouble in setting up the dataframe with the required index. Just lemme know how to organise the dataset properly. If you dont understand my question, just look at the code and run it and i guess you'll figure out what am i asking. *

1

There are 1 best solutions below

2
On BEST ANSWER

You could use pandas.read_csv:

import pandas as pd
daf = pd.read_csv('https://github.com/justmarkham/DAT8/blob/master/data/beer.txt', ' ')