To begin this project: fork this repository.
This repository includes a complete pandas
analysis of customer behavior in the analyze.py
file. The file pulls in data from data/raw/shopping_behavior_updated.csv
and prints out a few summary statistics on group aggregates in our dataset.
However, while it runs successfully, it is badly designed and needs to be refactored. That is, we need to rewrite this code into more efficient statements while still preserving its functionality.
Take a look at the analyze.py
file and rewrite this code to address the following issues:
- poor variable naming conventions
- unnecessarily complex lines of code
- insufficient comments
- behavior that should be modularized into functions
Run your code after each change to ensure that the behavior remains the same.
After implementing your changes, push your updated code to your forked repo.