Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.15 KB

File metadata and controls

37 lines (25 loc) · 1.15 KB

python-scripts

These scripts have dependencies as seen in the Pipfile (Beautiful Soup, lxml, Pandas, and xlsxwriter)

Install the dependencies in a pipenv virtual environment:

  1. open a terminal
  2. cd to the directory where the Pipfile file is
  3. pip install pipenv
  4. pipenv shell
  5. Make sure you are using the correct python interpreter
  6. pipenv sync

Option 1

Run these Python scripts to generate Excel files in their respective directories:

  • python ./python_baby_names/question_1.py

  • python ./python_baby_names/question_2.py

  • python ./python_fix_logs/question_1.py

  • python ./python_fix_logs/question_2.py

Option 2

Run these alternate Python scripts to generate Excel files in their respective directories:

These use Regular Expressions to generate the same files as Option 1.

  1. Make sure you have all the latest dependencies pipenv sync
  • python ./python_baby_names/question_1_v2.py

  • python ./python_baby_names/question_2_v2.py

  • python ./python_fix_logs/question_1_v2.py

  • python ./python_fix_logs/question_2_v2.py

  1. exit
  2. pipenv --rm