I am looking a way to read the dataset directly from UCI Machine Learning repository. But i am only able to get dataset.. not its description.
Here is the link https://archive.ics.uci.edu/ml/datasets/Car+Evaluation and https://archive.ics.uci.edu/ml/machine-learning-databases/car/ to the data I want to import.
The files are .data and .names. How do you import them into Python as a data frame? I have tried as below.. where i have to manually write the features or column names. Is there a way we can read .names file and set the features from there. Creating the feature names manually might be ok for dataset with handful of features.. but as features grow it will be hard to do it manually.
# Without Column Names
df = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/car/car.data', header=None)
# Generating Column Name manually.
names=[ 'buying','maint','doors','persons','lug_boot','safety','class']
df2 = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/car/car.data', names = names)
Any help, will be appreciated. Thanks.