Skip to content

Issues with filepaths  #1021

@NidhiGowdra

Description

@NidhiGowdra

Some users might have trouble reading data if they use relative paths after downloading and extracting the dataset provided in setup.

Good to add a note of using Absolute paths.

Relative paths:
numpy.loadtxt("inflammation-01.csv")

Absolute Paths:
Windows:
numpy.loadtxt("D:\python-novice-inflammation-data\data\inflammation-01.csv")
or
numpy.loadtxt(r"D:\python-novice-inflammation-data\data\inflammation-01.csv")

Linux/MacOS:
numpy.loadtxt("D:/python-novice-inflammation-data/data/inflammation-01.csv")

Setting the path to the current working directory where the program is being executed:
import os
os.chdir(os.getcwd())

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:enhancementPropose enhancement to the lesson

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions