0

I downloaded a dataset of Blood Transfusion Service Center Data Set from UCI machine learning repository. The two files are 1- transfusion.data 2- transfusion.names

How can a beginner load both these files in python ?

1
  • Hi! From a quick look at the files, it seems they are simply text files. You can inspect them with any text editor. The transfusion.data seems to be in the CSV format. There are many tutorials on how to load CSV data in Python, that should get you started. Commented Nov 7, 2020 at 20:07

1 Answer 1

1

Instead of first downloading the file (which you could do), you could do this

import pandas as pd

data = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/blood-transfusion/transfusion.data')

and

data = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/blood-transfusion/transfusion.names')

(If you DO choose to download), use the same method but give the path to the file.)

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

“Don't download them directly to your folder” — Why not? Is it against your religion?
No....it was just a suggestion that might save time and uneccesary steps. But for the sake of argument, I'll edit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.