Skip to content

california_cities.csv missing in notebooks/data/ #430

Open

Description

@thozimm

The following lines from the book result in "404 not found"

url = ('https://raw.githubusercontent.com/jakevdp/PythonDataScienceHandbook/'
'master/notebooks/data/california_cities.csv')
!cd data && curl -O {url}

Activity

  1. added a commit that references this issue on Aug 4, 2025
    144d40a
  2. lashvv commented on Aug 4, 2025

    @lashvv

    I've added the missing california_cities.csv and opened a pull request to fix this. Hope this helps!

  3. fragrantauto commented on Sep 6, 2026

    @fragrantauto

    I checked the repo root and noticed the default branch was updated from master to main, which usually triggers

  4. wafir645fcqs49 commented on Sep 16, 2026

    @wafir645fcqs49
  5. naeemgwendlyn26 commented on Oct 8, 2026

    @naeemgwendlyn26

    The path should be updated to point to main/notebooks/data/california_cities.csv, but verify if the raw content URL also requires updating the base domain or headers to prevent similar 404s for other files in the same directory.

  6. carlinshree commented on Oct 10, 2026

    @carlinshree

    Updating the URL to the main branch will resolve the immediate 404, but we should also consider replacing curl with urllib.request.urlretrieve to make the notebook platform-independent across Windows and Unix environments. Does anyone know if there are other hardcoded path dependencies in the surrounding cells that will trigger similar failures once this link is corrected?

  7. tyshawnaamonte commented on Nov 23, 2026

    @tyshawnaamonte

    Beyond updating the branch to main, we should implement a check using os.path.exists before the download command to prevent redundant network calls if the data is already present in the local directory. Are there other hardcoded curl calls in the remaining notebooks that need to be refactored to urllib as well?

  8. dayvenhppg2 commented on Nov 27, 2026

    @dayvenhppg2

    Beyond updating the branch to main, we should consider replacing the !cd data && curl -O shell command with requests.get() or urllib.request.urlretrieve to ensure cross-platform compatibility. If we move to a native Python approach, should we also implement a check to verify if the file already exists locally before attempting the download to avoid redundant network requests? Are there other notebooks in the repository that rely on this specific shell-based data retrieval pattern that will need similar refactoring?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions