Installation

  1. Install Python for Windows
    1. Add Python to Environment Variables (Checked)
  2. Install VSCode for Windows
    1. From Extensions, install the following:
      1. Python
      2. Jupyter

Setup pySara

  1. Create a Working Directory (Documents > FOQA)
  2. Open Working Directory from VSCode
    1. File > Open Folder > Select Folder
    2. If prompted, Trust the folder
  3. Download pySara from Teams > FOQA > Files > Python > pysara.zip and extract to your new working directory
  4. From the pysara folder extracted to your working directory, double click on Getting Started.ipynb. It should open in VSCode
  5. To install required libraries:
    • Terminal menu > New Terminal
    • pip install pandas seaborn numpy requests plotly
  6. Follow the instructions in the notebook to install

Jupyter Introduction

  1. Cell Types: Code and Markup
  2. Shortcuts (hit escape to enter command mode)
    • Shift Enter: Execute Cell
    • A: Add Cell Above
    • B: Add Cell Below
    • DD: Delete Cell
    • F: Find/Find and Replace
    • Enter: Enter edit mode
  3. Markdown
    • Headers
    • Lists
  4. Markdown Guide: https://www.ibm.com/docs/en/watson-studio-local/1.2.3?topic=notebooks-markdown-jupyter-cheatsheet

Python Introduction


  • Python Basics
    1. whitespace
    2. imports & libraries
    3. Variables (numbers, strings, lists, tuples, dictionaries, objects)
    4. functions
    5. looping
    6. if, elif, else

Pandas and Data Manipulation

Python and Proxies

PIP (primary package manager for python) will use the following locations on windows:

  • User: C:\Users\<<username>>\pip\pip.ini
  • User: C:\Users\<<username>>\AppData\Roaming\pip\pip.ini
  • System: C:\ProgramData\pip\pip.ini

Create a pip.ini file in one of these locations, and then copy these contents into it:

    [global]
    trusted-host = pypi.python.org
                   pypi.org
                   files.pythonhosted.org
    proxy = http://internet.proxy.fedex.com:3128