Session1 - Analytics For Programming II - Siryani - 082224
Session1 - Analytics For Programming II - Siryani - 082224
Session 1
Thursday August 22nd, 2024
Leading teams focused on Instructor of Data Science Virginia Chapter PhD in Systems Engineering
• Data Science & AI • Python Programming Speaker at HIMSS22 focused on Applied Machine
• Statistical Modeling • Python for Data Science • Evolving Standards for Learning and intelligent
• Analytics • Machine Learning Machine Learning and AI Decision Support Systems
• AI Enablement / Governance • Data Visualization in Tableau
• Data Visualization Governance • AI Strategy
Agenda
I look forward to working with you during this class and wish you the very best with this learning experience!
Course Objectives
Are you ready to power up your career and learn the best programming language for data science?
Students who successfully complete the course requirements will be able to:
❖ Read in data (including unstructured text) and learn how to process for analysis
✔ Download, install, and configure Anaconda, which is the recommended version of Python to use during this
course. If you do not already have it on your machine, the installation link is https://www.anaconda.com/
❖ I encourage you to interact with each other, not just with me. You all bring diverse backgrounds to the course, and we all
benefit from your contributions. Learning and discovery takes place during the class and on the various discussion boards all
the way through the last day of class. Please review the boards frequently, post early, and post often (even after you meet the
mandatory requirements)
❖ When responding to your classmates’ postings, you can engage in several different ways. Here are just a few examples:
✔ Supplement the post made by your classmates by citing additional data or material from the reading assignments or other reading
materials. Please cite your references when you do this
✔ Apply the course material to your professional or personal experience from the past or present
✔ Share divergent perspectives and/or experiences from what your classmate expressed
✔ Please assume the best intentions from your peers in class. Maintaining a safe environment for learning is essential
Different Types of Analytics
Source: www.gartner.com
Gartner’s analytics ascendancy model
Source: www.gartner.com
2 Syllabus Overview
Review Syllabus on Blackboard !
3 Lecture 1 & Hands-On
Introduction to Python
float Floating-point numbers: represent real numbers and are written with a decimal 5.67
point dividing the integer and fractional parts
string A sequence of characters. Strings start and end with single or double quotes “Hello World”
boolean Represents the truth values False and True (or in a numeric context, 0 and 1) True
Python Variable Types
Global variable
A global variable is a variable that is defined outside of a function or class definition. Typically, both function
names and module names are global variables.
Local variable
A local variable is a variable that is created within the body of a function or method.
Python Conditional Statements
A conditional statement is a statement of the form
if <bool>:
<statements>
Python executes this statement as follows: If the boolean expression is True, if executes the statements underneath.
Otherwise, it skips over them.
An alternate form of a conditional is as follows:
if <bool>:
<statements>
else:
<statements>
This form is executed as follows: If the boolean expression is True, it executes the statements underneath the if. Otherwise, it
executes the statements underneath the else. There are additional forms of conditional statements that use the keyword elif.
Python Conditional Expression
To evaluate this expression, Python first evaluates the boolean expression <bool>. If the boolean is True, Python
uses the value of <expr1> as the value of the conditional expression. Otherwise, Python uses the value of
<expr2> as the value of the conditional expression.
Python Container Data Types
❖ Dictionaries: for associating unique members of one set of items (keys) with members of another set (values)
❖ Tuples: like lists, for storing a sequence of items in a specific order, but cannot be modified once created
Python For-loop
<statements>
Python executes this statement as follows: It puts the first element of the iterable in the variable, and then
executes the statements indented underneath. It repeats this process if there are still elements left in the iterable.
In a for-loop, the variable after the keyword for is called the loop-variable while the iterable is called the
loop-iterable or loop-sequence.
Python While-loop
Python executes this statement as follows: It first evaluates the boolean expression. If it is True, then it executes
the statements indented underneath. It repeats this process if the boolean expression is True. This boolean
expression is often referred to as the loop condition.
While-loops are difficult to use properly and are often combined with loop invariants.
Python Container Data Types - Lists
Containers are data types that hold other pieces of data but diff er in how those data elements are accessed and what sorts of operations they
support.
Lists
▪ A Python list is a mutable sequence of objects; list elements can be of any type
▪ List elements are indexed by their position in the sequence, with valid indices being integers starting with 0 and ending with n-1, where n
is the number of elements in the list
▪ List elements are accessed using square brackets ([ ]) and can be used for either getting or setting elements at a given position; e.g.,
o my_list[4] returns the element at position 4 in my_list
o my_list[5] = 6 sets the element at position 5 in my_list to the value 6
▪ Lists can also be sliced using square brackets, to get contiguous blocks of elements
o my_list[i:j] returns a list containing elements from my_list starting at position i and ending at position j-1 (so that the number of
elements in the sublist is j-i)
▪ Lists are mutable; elements can be changed, added, or removed
▪ for loops are a useful way of iterating over all the elements of a list; e.g.,
x,y,z = my_func()
# requires that my_func() return three objects, or a tuple with three elements
Let The Hands-On begin !
Python Hands-on
Funger Hall
josephsiryani
2201 G St. NW
Washington, D.C. 20052