
See how this course helps finance and business professionals move from Excel to Python pandas using real-world data analysis workflows.
Follow a practical data analysis flow from importing data through inspecting, understanding structure, cleaning, manipulating, and summarizing, to exporting data for use in Excel.
Explore how the Our World in Data dataset is sourced and shared on GitHub under a Creative Commons license, used as covid-context example for active learning with your own data.
Learn how to install Python across different systems, find Python.org downloads, use Anaconda Navigator to launch Jupyter Notebooks, and run notebooks in a web browser.
Learn how Jupyter notebooks color code strings in red, comparisons in purple, numbers and groupings in green, keywords in dark green, and user-defined functions in blue; ctrl+/ toggles comments.
Introduction and Setup
Demonstrated small bits of Python code.
Introduced the Pandas library and its significance.
Explained the importing process of a dataset (Our World in Data COVID codebook) into a CSV file using the read_csv() function.
Object-Oriented Programming (OOP) in Python
Everything in Python is essentially an object.
Individual elements are objects.
Sets or groups of elements (e.g., data in a column) are also objects.
Collections, like column labels, are objects.
Function inputs can also be objects.
Briefly touched upon functions, mentioning how they can accept objects as parameters.
Python Syntax and Notation
Highlighted that Python is case-sensitive.
Example: The case difference between variables affects code execution.
Discussed dot notation:
Used for accessing elements or functions from libraries or objects.
Demonstrated with the pd.read_csv() function and accessing column values.
Introduced the index operator:
Explained its use with square brackets to access specific elements within objects.
Differentiated between list notation and the index operator.
Briefly touched on the concept of indexes in data structures.
Accessing Documentation in Pandas
Stressed the importance of referring to the Pandas documentation.
Demonstrated two methods to access documentation:
Using the Shift + Tab shortcut in Jupyter notebooks.
Searching for specific functions or topics online, ideally on the official pandas documentation website.
Differentiated between parameters and arguments in function calls.
Emphasized the usefulness of documentation for understanding functions, parameters, and more.
In this lecture, students will delve deeper into Python by understanding:
Attributes:
Attributes give information about an object.
Attributes are accessed using dot notation.
Examples on how to retrieving the size of a dataframe and how to accessing column labels using attributes.
An attribute is distinguished from a function by its plain text right after an object, without parentheses.
Functions:
Functions perform predefined tasks on objects.
They are often used for routine tasks and are invoked with parentheses.
Examples of functions provided include the read_csv() function to import data and the head() function to display the initial rows of a dataframe.
Functions can take arguments, which determine their specific behaviour.
Method Chaining: allows for performing multiple operations successively.
Parameter vs. Argument:
A parameter is a variable in the definition of a function.
An argument is the actual value that gets passed into the function.
Some functions have default arguments, which means they assume a specific value unless provided otherwise by the user.
Importance of Documentation:
For further guidance, consulting function documentation will be very useful to determine the list of parameters and their default values.
Explore the index in the pandas library, its zero-based and immutable properties, and how to reference it versus column labels using the index operator and axis.
Rename column labels by passing a list to the names parameter and set header equals zero to avoid header row; illustrate read Excel behavior and store labels in a variable.
Learn how to customize null values during data import by using the na_values parameter, adding strings like Asia, Africa, and not applicable to be treated as missing.
Set and reset index labels in a data frame, convert index columns back to data columns, and control dropping with the drop parameter, including single or multiple indices.
Learn how to swap the order of multi index levels in a data frame using the swap level function, with two- and three-level examples and label or position references.
Use df.info to inspect dataframe attributes, revealing columns, labels, non-null counts, and data types, including floats and objects, with numeric columns defaulting to float. Verify size with df.shape and df.size.
Count the occurrences of distinct column values with value_counts, reference columns by attribute or index, sort results from high to low, and handle nulls with dropna and isna.
Derive cumulative max, min, and sum values from numeric columns in a data frame by filtering to numeric columns, then apply row-wise cumulative functions to track highs, lows, and totals.
Learn to detect null values in a data frame using isna and related functions, count nulls with sum, and reference columns by attribute or with the index operator for spaces.
Convert a date column to datetime in a pandas data frame with pd.to_datetime, assign the result to the date column to update the type, and verify with the column's types.
Level up your Excel data analysis skills by transitioning from Excel to Python seamlessly with my tailored course designed exclusively for professionals. Discover the power of the Python's Pandas library in handling large datasets, automating boring and repetitive tasks, and simplifying data management.
What sets this course apart?
Real-world Application: This course isn’t a generic Python tutorial. It's crafted by a seasoned finance professional for professionals. Hence, every lesson, tip, and trick is rooted in real-life scenarios.
From Basics to Advanced: Whether you're a novice or someone who's dabbled in Python before, this course caters to all. It commences with the foundational aspects of Python and Pandas and gradually dives into advanced techniques ensuring a comprehensive learning experience.
Practical Focus: We understand that finance professionals mostly deal with CSV and Excel files. This course primarily revolves around these, but we also touch upon importing data in varied formats.
End-to-end Learning: Apart from learning Python and Pandas, get acquainted with the Jupyter Notebooks programming environment. Follow along as we delve deep into importing, inspecting, and manipulating data. Master the art of data cleaning using string functions, and ascertain ways to avoid errors. Conclusively, we’ll guide you on summarizing your data, ensuring it’s export-ready.