Introductory Python

offered by NYC Data Science Academy



This is a class for computer-literate people with no programming background who wish to learn basic Python programming. The course is aimed at those who want to learn “data wrangling” – manipulating downloaded files to make them amenable to analysis. We concentrate on language basics such as list and string manipulation, control structures, simple data analysis packages, and introduce modules for downloading data from the web.
This is a “short course” of four weeks, with five hours of class per week (split into 2 ½ hour evening classes). Classes will be given in a lab setting, with student exercises mixed with lectures. Students should bring a laptop to class. There will be a modest amount of homework after each class. Due to the focused nature of this course, there will be no individual class projects but the instructors will be available to help students who are applying Python to their own work outside of class.

Unit 1: List manipulation
Simple values and expressions
Defining functions, using ordinary syntax and lambda syntax
Built-in functions and subscripting
Nested lists
Functional operators: map and filter
List comprehensions
Multiple-list operations: map and zip
Functional operators: reduce

Unit 2: Strings and simple I/O
Strings as lists of characters
Built-in string operations
Input files as lists of strings
Print statement
Reading data from the web
Using the requests package
String-based web scraping (e.g. handling csv files)

Unit 3: Control structures
Statements vs. expressions
For loops
Variables in for loops
if statements
Simple and nested if statements
Conditional expressions in lambda functions
While loops
break and continue

Unit 4: Data Analysis Packages
Subscripting and slicing
Data Structure
Data Manipulation
Grouping and Aggregation