[IntroRemoteDS-pre] Accessing Data in L3_DataPreparation Notebook is different from Course Script
leriomaggio opened this issue · comments
Valerio Maggio commented
Description
In current version of the notebook, the data is accessed directly from GitHub:
#Load data
import pandas as pd
raw_data = pd.read_csv("https://raw.githubusercontent.com/OpenMined/PySyft/dev/notebooks/course3/dataset/L3_data.csv")
whereas the snippet shown in the C3L3C2 - Data Acquisition!
is:
# Load data
import pandas as pd
raw_data = pd.read_csv("dataset/L3_raw_data.csv")
raw_data.head()
I do appreciate opening the data from GitHub (esp. if running the notebook in Colab) but it's a bit pointless if running the code from local Jupyter.
Therefore, I resorted changing my own notebook replacing with the following line:
# Load data
import pandas as pd
from pathlib import Path
from os import path as p
BASE_FOLDER = Path(p.abspath(p.curdir))
DATA_FOLDER = BASE_FOLDER / "dataset"
if DATA_FOLDER.exists():
datafile_ref = DATA_FOLDER / "L3_raw_data.csv"
else:
datafile_ref = "https://raw.githubusercontent.com/OpenMined/PySyft/dev/notebooks/course3/dataset/L3_data.csv"
raw_data = pd.read_csv(datafile_ref)
Are you interested in working on this improvement yourself?
- Yes, I am.
That's just a suggestion.
Feel free to close and reject the issue, if you'd prefer keep it otherwise :)