dataset #832
Replies: 1 comment
|
Hi soumya rai (@Soumya-3010), welcome to the course! You don't need to download the dataset separately. It is already in the repository, in the The loading example opens it with a relative path (line 33): data = pd.read_csv('../data/birds.csv')
git clone https://github.com/microsoft/Data-Science-For-Beginners.git
cd Data-Science-For-Beginners/examples
pip install pandas
python 02_loading_data.py(The main README also shows a lighter clone that skips the translations, if the full one is too big.) I tried it with Python 3.12 and pandas 3.0.6:
If you only want to try the example without cloning, you can point pandas at the file on GitHub instead. This worked for me: data = pd.read_csv("https://raw.githubusercontent.com/microsoft/Data-Science-For-Beginners/main/data/birds.csv")And if you want the script to work no matter which folder you run it from, you can build the path from the script's own location: from pathlib import Path
data_file = Path(__file__).resolve().parent.parent / "data" / "birds.csv"
data = pd.read_csv(data_file)With that change it ran fine from |
Uh oh!
There was an error while loading. Please reload this page.
how can i download the data set or where could i get it from i have just started this course and reading example section first for better understanding. but in load data example i dont have csv file
All reactions