
Install python on macOS by downloading the python.org installer and following setup steps, then verify with Python 3 by printing Hello, world. Alternatively install via homebrew with brew install python3.
Define variables to store data in memory and refer to them by descriptive names; use assignment statements to bind values, support reassignment, and multi-variable assignment in Python.
Learn the five basic data types in Python—integer, string, float, boolean, and long type—and use type and print to inspect values.
Learn to build strings in Python through concatenation with the plus operator, cast integers to strings, and format outputs using the format function to control padding, width, and decimals.
Learn data analysis with Python by using for loops to sum numbers and iterate over iterables with range, printing the total of five thousand and fifty.
Learn how the Python range function creates sequences with start, stop, and step, from 0 to 9 and odd numbers, and how to compute the sum from 1 to 100.
Explore the while loop in python by checking a condition each iteration, using it to count up to five and compute a factorial, while noting infinite loops and overflow risks.
Explore python control flow with break and continue, showing how break terminates loops and continue skips to the next iteration, with practical examples and a running sum.
Learn Python's built-in functions, such as int, float, str, bool, and isinstance. Apply max, min, len, range, type, round, map, and filter with practical examples and user input.
Define your own functions in Python using def to compute circle areas. See examples with and without parameters, and how function calls simplify repeated tasks.
Learn how to use functional decomposition to break problems into smaller functions, where one function calls another and the sum of squares shows reusable Python code.
Explore the Python list data structure as a mutable, sequential collection using square brackets and commas. Learn to create, access, and count elements, including nested and mixed-type lists.
Learn how to use Python lists by understanding index positions, zero-based counting, and slicing syntax to extract elements with start, end, negative indices, and steps.
Learn python list traversal by items and by index, using for loops and range(len(list)), modify elements during iteration, and find the maximum value with comparison or sorting.
Whenever you need to write a function that creates and returns a list, this pattern can be used.
Write a program to generate the first 100 prime numbers. The input is the number of prime numbers, the output is a list of prime numbers.
Learn how to iterate over tuples in Python using for loops and index-based methods, recognize immutability that prevents assignment, and understand the performance advantages of accessing elements in tuples.
Explore Python dictionaries by using keys, values, items, and get to access, iterate, and update key-value pairs; learn handling missing keys with in and get methods, and adding new entries.
Read a text file, clean and split into words by removing special characters and numbers, build a word count dictionary, and write the results to an output file.
Explore Python sets as unordered collections of unique objects, unlike dictionaries with keys, and learn to construct sets with curly braces or set(), noting there are no duplicates.
Learn core set theory concepts and practical Python techniques, including membership, subset, intersection, union, difference, and the set methods add, remove, and update, with examples.
Learn how to iterate over sets in Python using the in operator and optional conversion to a list, printing elements in a defined order.
Explore Python's standard library and the PyPI ecosystem, browse modules from math to datetime, and learn how to install and explore packages like pandas with pip.
Install and import Python packages using pip, and call functions from math and pandas libraries. Import specific parts with from module import function, and alias libraries like numpy as np.
Learn to build a pandas data frame from a dictionary of objects, create series and columns with mixed types, and inspect data using info, describe, head, tail, index, and shape.
Learn to slice and dice pandas dataframes to extract subsets by rows and columns using square brackets, .loc label-based indexing, .iloc integer-positioning, boolean masks, and callable functions.
Explore pandas DataFrame slicing with loc to select rows and columns by label, using single labels, label lists, boolean arrays, callable functions, and slice ranges that include start and stop.
Learn pandas descriptive statistics by using aggregation functions on a data frame, with axis choices, to compute mean, standard deviation, unique values, value counts, and cumulative sums via apply.
Learn to merge data in pandas by combining two tables into one data frame using inner, left, right, and outer joins with the merge method and the how parameter.
Learn to concatenate data in pandas by merging and appending rows or columns, using frames to combine multiple files into a single data frame for analysis.
Learn to remove duplicate rows in a dataframe with the drop duplicates method, including subset-based deduplication and in-place versus copy options, illustrated by a brand and rating example.
Group data using pandas groupby to split data by criteria such as department or time, apply aggregation functions, and combine the results into a final summary table.
Use pandas groupby on column a to compute the maximum of column c for each subgroup of a, applying the max aggregation and interpreting by department.
Group data by column a with pandas groupby and apply multiple aggregations using aggregate, computing means for column c and sums for column d across subgroups.
Explore how to create a pivot table in pandas, using group by, index, columns, and mean aggregation to summarize grades by class and gender.
Read and write data with pandas using csv and excel formats, via read_csv and to_csv. Group by country, compute mean log GDP per capita, and export top 10 to csv.
Learn to read multiple csv files and combine them into a single data frame using pd.concat, via a loop or a glob pattern.
Explore handling missing data in pandas by inspecting a data frame, counting missing values with isnull, and cleaning rows with dropna using how='any'.
Create arrays from sequences like lists and tuples, and inspect their shapes and types. Initialize arrays with zeros or ones, and build 2d and 3d arrays from nested sequences.
Explore array creation with range and linspace, using start, end, and step to define elements, and learn how linspace fixes the number of points for plotting functions with matplotlib.
Learn how to print arrays and reshape them to modify their shape, including one-, two-, and three-dimensional cases, with axes printed from left to right and top to bottom.
Explore array operations in Python data analysis: perform element-wise addition, multiplication, and division on arrays, apply boolean comparisons, and compute matrix products using dot.
Explore advanced array indexing in Python by using arrays of indices and booleans to access elements out of order or repeatedly, including color palettes and image indexing.
Learn advanced array indexing by using a boolean mask to select elements and assign values in a multi-dimensional array, illustrated with a 3x4 array and conditional filtering.
Explore essential numpy methods for data analysis, including random and random normal samples, random permutation, floor operations, and stacking, splitting, and diagonal extraction of arrays.
Apply conditional logic to arrays by replacing negative values with zero, and use any and all to evaluate boolean arrays; count true values by summing booleans.
Master statistics basics and linear algebra, including population, sample, mean, variance, and standard deviation, and learn matrix operations like transpose, norms, inverse, and determinants for Python-based data analysis.
Learn to model a sudoku board as a 9x9 array with zeros for empty cells and solve it using backtracking, validating rows, columns, and 3x3 subgrids.
Learn how lambda functions enable anonymous, single-expression operations in Python for simple data processing tasks, handling any number of arguments, including summing inputs or squaring a value.
Learn how Python's filter function tests each element with a function, returning an iterable of items that meet the condition, such as values 18 and above in a list.
Apply the map function to transform every item in an input iterable, producing a new iterable, with examples that double numbers and capitalize strings.
Learn how to handle Python exceptions and debug programs by converting data types, preventing type errors when mixing strings and numbers, and managing file I/O and network request errors.
Explore handling exceptions in Python by using try-except blocks to catch and respond to invalid input, convert input to integers, and define specific exception types.
Learn how try-except-finally blocks handle exceptions and guarantee cleanup with finally. See how to read and write files, close them reliably, and handle keyboard interrupts.
Explore how to locate and access files within a directory tree using relative and absolute paths. Apply double dot notation to move between parent and subdirectories.
Learn how to fetch data from online APIs with requests, handle JSON responses, parse to dictionaries, and safely manage errors and timeouts for robust data analysis in Python.
This part shows the solution to project question 1 - 3.
This part shows how to convert data time columns to string by using strftime method.
Count how many products have more than three variations by counting variations in the item information and filter to reveal two hundred forty two thousand one hundred fifty products.
Get started
Python is a powerful, modern programming language that has the capabilities required for experienced programmers, while being easy enough for beginners to learn.
The course covers everything you need to get started with Python. The course also provides regular quizzes and hands-on exercises to enable you not only to understand the concepts but to practice them thoroughly. "Talk is cheap, show me your code", we want you to make mistakes, correct them and learn from experience.
Highlight
Here is a brief description of what you will learn in each section.
Section 1. Python.
This section covers the basics of Python, from python introduction to installing the required tools.
Why learn Python?
What Python can do?
How to install Python tool kits?
Section 2. Fundamentals
In this section, we will lay foundations on programming basics, such as data types, operators, control flows, scope etc. These concepts can apply to other programming languages as well. You may have heard of If statement, for loops, while loop before. In this section, we will use real examples to demonstrate the usage.
Section 3: Python Data structures
Understanding data structures are vital to every programming. We will go through the three key data structures in Python and discuss how to use them efficiently.
List/Tuple/Dictionary
Methods in List/Tuple/Dictionary
List comprehension
Section 4: Pandas
Pandas is go-to library for data analysis in Python. In this section, we will go into the details of pandas library functions, and how to read, extract, process, manipulate data in Pandas. The techniques in this section are often used in data science and machine learning processes.
Slicing
Indexing
Grouping
Filtering
Updating
Section 5: Numpy
Numpy is a python package for scientific computing. It provides a fast and flexible data processing data structure in Python. In this part, we will show how to use numpy to do data processing, such as slicing, indexing, grouping, filtering, updating, creating etc.
Section 6: Functional Programming
Python functional programming features can make data processing more efficient. In this section, we will cover a few functional programming, such as Lambda function, filter, map, reduce.
Lambda
Filter
Map
Reduce
Section 7: Exception handling
When writing codes, it takes time to debug. In this section, we will learn what are the usual type of errors in the code, how we can efficiently debug, and how to handle the exceptions.
try: except block
Raise error
Principles for using exceptions
Section 8: File Input/Output
In real life, data reside in files. In this part, we will introduce the python concepts necessary to use data from files in the programs, such as
locate files
open/read files
write files
close files
Section 9: Course project
In this section, you will get exposure to a real business case and process the data using Pandas and Numpy to solve a few business questions.
You will practice your python skills with real examples.
_________________________________________________________________________
So what are we waiting for? Let's begin our Python journey and start coding!