Foundations of Business
Analytics
DSCI 300
Module 5 - Python
Dr. Wenli Xiao
Install Python
Download the “Anaconda” version of Python for your
OS
(https://www.anaconda.com/products/individual)
Anaconda prepackages a number of useful libraries:
• Numpy: core math/stats functions
• Pandas: Data manipulation
• Matplotlib: Visualizations
• Scikit: Machine Learning
• Jupyter: Notebook interface
(full list at
https://docs.anaconda.com/anaconda/packages/pk
g-docs/)
Access to Python
Several ways to work with Python: Anaconda Navigator
gives you a graphical overview.
•Prompt: A simple command prompt. Cleanest way to install new
stuff.
•Spyder: Old school development environment: write program
files, debug, etc. Feels like Matlab, Stata, R Studio, etc.
•Jupyter/Jupyter Lab (my preferences): A browser-based
notebook that stores text, code, and results altogether.
When you launch Jupyter, you’ll get a command window,
and eventually a new browser window that look like a
typically file directory.
3
Why Python?
Python has become the most popular
programming language for data science and
Fintech. Competency in Python is a critical
skill for students interested in pursuing
careers in these fields.
This module equips a motivated student who
has little or no prior programming experience
with a working knowledge of the Python
programming language and the Pandas
package to conduct basic data analytics.
4
Expectation
Students will be expected to be able to:
1. Read and write basic Python syntax, such as looping,
defining functions, creating or modifying lists,
dictionaries, and tuples.
2. Write Python code to read, write, filter, merge,
summarize, and graph a given dataset.
3. Download and analyze dataset from secondary data
sources.
4. Communicate effectively the purpose, methodology,
and result of an analysis involving Python to a non-
technical business audience.
5
Books to Use
• Chapters 1-10 of “Python for Everybody” by
Charles R. Severance, available at
https://www.py4e.com/book.php. (Both the
PDF and HTML versions are free.)
• Chapters 1-3 of “Pandas for Everyone” by
Daniel Y. Chen, available for purchase on
Amazon.com or Pearson.com. (Cost is around
$30 for the print edition.)
6
Questions?