Conversation
The notebook now covers the full arc of src/prepare_sales.py and src/analyze_sales.py, from loading the raw CSV through cleaning, describing, grouping, and charting, so it runs without the scripts. Drop the parent-directory fallback and use PROJECT_ROOT to match the tutorial's code blocks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
requires-python in pyproject.toml and the lockfile already constrain the interpreter to 3.14, and the tutorial has the reader pick 3.14 in Positron's Create Environment flow. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Match the folder name, the branch, and the tutorial slug. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The notebook holds the cleaned DataFrame in memory, so it no longer writes data/sales_clean.csv or reads it back. The analysis cells work from clean_sales directly. The scripts still use the CSV to hand data from prepare_sales.py to analyze_sales.py. Pin Matplotlib to 3.11.2 to match the version the tutorial states. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Positron starts a session in the folder holding the file, so Path.cwd() pointed at src/ or notebooks/ and the data path missed by one level. Use Path.cwd().parent in both scripts and the notebook, and document running them from their own folder. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The tutorial no longer walks through nlargest, so remove it from the script and the notebook. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Positron's Console starts at the workspace root, so the scripts use Path.cwd(). A notebook kernel starts in the notebook's own folder, so the notebook keeps Path.cwd().parent. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The tutorial doesn't cover it, so the script's last cell is now just the to_csv call and the notebook goes straight from cleaning to the analysis. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The tutorial no longer covers installing an external package, so the interactive chart cell and its uv add instructions are gone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The scripts use Path.cwd() while the notebook uses Path.cwd().parent, because a notebook's kernel starts in the notebook's own folder. Make that assumption visible instead of silent. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy-on-Write is the default in pandas 3.0, so .rename() already returns an independent object and the later assignments cannot reach the original sales DataFrame. Verified: sales keeps produce_name and its original categories without the copy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Where to put new files:
my-awesome-articleHow to merge your changes: