
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Learn to manage financial data with Python and pandas, from environment setup to importing data from Excel, CSV, and Yahoo Finance. Explore returns, risk, correlations, and rolling statistics for insights.
Learn how diversification and time diversification reduce stock risk, compare single-stock vs. S&P 500 outcomes, and visualize these trends with Python and pandas.
Learn to install Python and the data science ecosystem using Anaconda, a package manager that simplifies dependencies, supports Jupyter notebooks and IDEs, with step-by-step Windows, macOS, and Linux installation.
Explore how to use Jupyter notebooks for Python coding, including edit and command modes, markdown cells and headers, and keyboard shortcuts to run, organize, and handle errors.
Download the course materials zip to access Jupyter notebooks, Python codes, and datasets for parts including pandas basics and financial data workflows with Python and pandas, plus exercises and solutions.
Explore tabular data concepts with pandas dataframes, including rows, columns, index, and observations, and learn how features map to columns and data types align.
Discover how ChatGPT aids pandas coding in Python, analyzes and writes code, and how free and plus versions differ, with emphasis on human oversight and improved efficiency.
learn to use pandas with GPT-3.5 and GPT-4o mini to write and inspect code for the Titanic csv dataset. analyze data with pandas methods like read_csv, head, describe, and isnull.
Master pandas display options for dataframes. Use head() and tail() to view the first and last rows, and adjust max and min rows to control output.
Boost your pandas coding efficiency by using tab completion and tooltips, learn to auto-complete read_csv and other methods, and explore sort_values parameters with shift tab for documentation.
Import pandas, load the listings dataset in a Jupyter notebook via Anaconda, and inspect first ten rows. Use assignment and solution to explore missing values and maximum last price.
Analyze the listings dataset from nyse, nasdaq, and amex with pandas read_csv, inspect with head and tail, and note missing values in last price, market cap, ipo year, sector, industry.
Select one or more columns in pandas dataframes using labels or lists, and distinguish when results are a series versus a dataframe, with the Titanic dataset example.
Explore selecting a single pandas column with dot notation or square brackets, verify results with the equals method on the age column, and prefer dot notation for clean data workflows.
Discover zero-based indexing and negative indexing in Python and Pandas. Learn position-based indexing to select rows, columns, and elements in a two-dimensional DataFrame.
Learn label-based indexing and slicing with the pandas reindex method for time series data and beyond, reassigning row and column labels, handling missing labels, and non-unique indexes.
Practice indexing and slicing pandas dataframes through coding exercise two, using Jupyter via Anaconda Navigator, with assignments and hints to reinforce Python and finance data skills.
Import pandas, read listings via read_csv, inspect data. Use dot and bracket notation, and iloc to fetch IPO years and names; set symbol as index and apply loc to AAPL.
Practice indexing and slicing dataframes in pandas by loading listings.csv, setting the symbol as index, and extracting Facebook's IPO, year, and industry with ChatGPT.
Explore advanced indexing and slicing in pandas with the Summer Olympics data set, using position and label based indexing, including combined cases and a simple ix workaround.
Learn to read errors and debug quickly in Python and Pandas. Apply trial and error and fix most issues in under a minute.
Test and refine debugging skills by identifying and fixing common Python errors in a dictionary-based Olympic medals dataset, including typos, key errors, type errors, and pandas series conversion.
Explore the major causes of coding errors—code problems, Python installation issues, and external factors—through examples like typos, wrong indents, and inappropriate inputs.
Identify and fix the most common Python errors—typos, missing dictionary keys, and syntax issues—using practical examples with underscores versus dots, brackets versus parentheses, and pandas series.
Explore index errors in pandas dataframes and lists with practical examples of out-of-bounds access and negative indexing, and learn to diagnose causes by inspecting previous cells.
Learn to diagnose and fix Python indentation errors by examining whitespace, tabs, and required indents in dictionaries, for loops, and Jupyter notebook cells.
Learn to avoid misusing Python built-in function names and keywords by choosing clear variable names, preventing overwriting functions like list and avoiding syntax errors.
Understand type errors and value errors in Python, with examples like adding int and string, invalid string to int conversions, removing missing list items, and negative square roots.
Learn to debug pandas errors with chatgpt by examining a key error in a data frame and applying fixes like setting the athlete column as the index.
Explore how to use Google and StackOverflow to fix coding errors, and learn the difference between positional and keyword arguments in Python with a pandas DataFrame example.
Learn to trace Python errors with the traceback, localize issues in complex backtesting code using pandas, numpy, and matplotlib, and fix typos to improve debugging efficiency.
Explore external factors that cause problems when using web APIs, scraping data, loading financial data, or placing online trades, and learn practical debugging tips for server errors.
Utilize a debugging flowchart to diagnose true errors or unexpected outputs by reading error messages, inspecting code (including previous cells), and restarting the kernel before testing with the course notebook.
Explore the updated debugging flowchart and use ChatGPT as a Python assistant. Read the error, inspect the code, restart the kernel, then ask ChatGPT before turning to Google or StackOverflow.
Explore pandas series as a one dimensional labeled array, select the age column from the Titanic dataframe using brackets or attributes, and convert the series to a dataframe with to_frame.
Analyze numerical pandas series using unique, nunique, and value_counts to uncover missing values, frequency distributions, and insightful summary statistics with describe, bins, and normalization.
Analyze non-numerical series using unique, nunique, and value_counts on the Summer Olympics medal dataset in Pandas, revealing athlete frequencies, missing values, and the distribution of medals across years and countries.
Explore sorting pandas series by values and by index, using sort_values and sort_index, and control changes with the in_place parameter while handling missing values.
Explore the coding exercise three solution with pandas: copy the last price column, compute max, min, frequencies, and sort prices and sectors to reveal finance and transportation patterns.
Learn how to change a data frame index with set_index and reset_index using pandas, including making a year or athlete label based index, adjusting drop and inplace options.
Change column labels in a pandas data frame by replacing all names with a new list, then name the column and row indices to clarify data, using the Titanic dataset.
Use rename() to change row or column labels in the Summer Olympics dataset using a dictionary mapping old to new names, with options for index or columns and in-place updates.
Explore Pandas index operations by selecting and reassigning a frame index, checking unique values and frequencies, naming and resetting index, creating a range index, and inspecting and renaming column indexes.
Learn to manipulate a finance data frame in pandas by setting a ticker index, checking duplicates, renaming columns to company and MoCap, and resetting to a range index.
Sort data frames and series with sort_values or sort_index on one or multiple columns, such as age, pclass, and sex, with ignore_index to restore a range index.
Learn to filter data frames by a single condition using a boolean series. Avoid chained indexing and prefer bracket or loc notation to select rows and columns.
Filter data frames by multiple conditions using the and operator, demonstrated on the Titanic dataset to select male passengers over 14 and view survival-related columns, with descriptive stats.
Master advanced filtering in pandas by applying between, isin, and the tilde to extract Olympic medals by year, creating boolean series and refined dataframes.
Sort and filter data frames by columns and index, identify unique values, and select top 10 by market capitalization and 15 lowest stock prices, filter Nasdaq penny stocks under 1.
Learn about NA values and missing values, why they occur, and how to detect and handle them in pandas using real sales data examples.
Identify and handle missing values in listings, transform the data type for the ipo column, save the cleaned data to a csv, and compute summary statistics and a correlation matrix.
Learn to clean finance data with pandas by identifying missing values, dropping and imputing rows or columns, converting types, exporting clean data, and computing descriptive statistics and correlations.
Analyze the employee salaries dataset with pandas in an interactive lab, clean missing values, compute descriptive statistics, filter top earners, and export a clean CSV named Employee salaries.csv.
Explore three histogram approaches for a data frame—plot method with kind, direct hist, and matplotlib plt.hist—covering bins, density, cumulative, and missing-value handling.
Create and customize a seaborn count plot from the Titanic data, grouping by sex and pclass, using pandas and sns, then adjust font size and color palette with sns.set.
Explore seaborn heatmaps and matrix plots to visualize cross tabular data from the Titanic dataset, using crosstabs by sex and class to reveal survival rates.
Import pandas, sort listings by IPO year, reset the index, and create plots with matplotlib and seaborn, including histograms, scatter plots, and a heat map.
Explore how to remove columns from a pandas data frame using the drop method, with options for columns or labels, in-place updates, and choosing to keep specific columns by selection.
Learn to remove rows and columns in pandas data frames using drop with index labels or boolean indexing, set an index, and apply inplace updates to filter 1996 or aquatics.
Learn how to add a new column to a pandas data frame using broadcasting, create a zero-valued column, and compare brackets versus attribute notation for creating versus selecting columns.
Combine data frames vertically by adding rows with append and pd.concat. Use ignore index, multi-index with keys, and reset index to manage origins and structure.
Learn to modify single or multiple elements in a pandas data frame by selecting with loc or iloc and assigning new values, including age conversions and conditional updates.
Explore exercise eight by manipulating a data frame: drop two columns and rows, add two new columns from existing data, sort by a column descending, and concatenate three data sets.
Discover how group by in pandas enables one-line, group-specific calculations like mean and median ages for male and female passengers, transforming a data frame into focused summaries.
Split a data frame by multiple keys with pandas group by, turning results into a list of grouped dataframes for country, gender, and year in the Summer Olympics.
Practice split-apply-combine in pandas to rank the top 20 Olympic medal counts by country and analyze Titanic survival by gender, class, and age group with groupby and aggregation.
Apply stack and unstack to transform a multi-index data frame from long to wide formats, group by country and medal types, and rearrange or fill missing values.
Learn to perform group by operations in pandas, compute group means and maximum values, count group sizes, and rearrange data with unstack.
Merge and analyze Northwind data using pandas to join customers, orders, products, and order details, compute revenue, and identify top products and customers.
Analyze temperature time series with pandas, handle missing values and key statistics, and visualize trends with matplotlib plots and subplots, including weekly or monthly data aggregation.
Explore creating a customized datetime index with pd.date_range across diverse frequencies, including daily, business days, hourly, weekly, monthly, quarterly, and annual, using start, end, periods, and date offsets.
Learn time series data analysis with Python and pandas by importing historic stock prices for Apple and Facebook, inspecting and visualizing them, and building timestamp indices from scratch.
Resample time series with pandas to downsample from hourly to daily or monthly, using the resample method with mean or other aggregations.
Learn to downsample finance time series using the period index, via a two-step workflow: resample to datetime, then convert to period, with monthly to annual options.
Downsample daily financial data to monthly with last or average options, compare daily and monthly prices, then downsample to weekly Fridays and build a daytime index for the stocks.
**Now with ChatGPT for Pandas & Data Analytics and Online Coding Exercises!**
The Finance and Investment Industry is experiencing a dramatic change driven by ever-increasing processing power & connectivity and the introduction of powerful Machine Learning tools. The Finance and Investment Industry is more and more shifting from a math/formula-based business to a data-driven business.
What can you do to keep pace?
No matter if you want to dive deep into Machine Learning, or if you simply want to increase productivity at work when handling Financial Data, there is the very first and most important step: Leave Excel behind and manage your Financial Data with Python and Pandas!
Pandas is the Excel for Python and learning Pandas from scratch is almost as easy as learning Excel. Pandas seems to be more complex at a first glance, as it simply offers so much more functionalities. The workflows you are used to do with Excel can be done with Pandas more efficiently. Pandas is a high-level coding library where all the hardcore coding stuff with dozens of coding lines are running automatically in the background. Pandas operations are typically done in one line of code! However, it is important to learn and master Pandas in a way that
you understand what is going on
you are aware of the pitfalls (Don´ts)
you know best practices (Dos)
MANAGE FINANCE DATA WITH PYTHON & PANDAS best prepares you to master new challenges and to stay ahead of your peers, fellows and competitors! Coding with Python/Pandas is one of the most in-demand skills in Finance.
This course is one of the most practical courses on Udemy with 200 Coding Exercises and a Final Project. You are free to select your individual level of difficulty. If you have no experience with Pandas at all, Part 1 will teach you all the essentials (From Zero to Hero).
Part 2 - The Core of this Course
Import Financial Data from Free Web Sources, Excel- and CSV-Files
Calculate Risk, Return, and Correlation of Stocks, Indexes and Portfolios
Calculate simple Returns, log Returns, and annualized Returns & Risk
Create your own customized Financial Index (price-weighted vs. equal-weighted vs. value-weighted)
Understand the difference between Price Return and Total Return
Create, analyze and optimize Stock Portfolios
Calculate Sharpe Ratio, Systematic Risk, Unsystematic Risk, Beta and Alpha for Stocks, Indexes and Portfolios
Understand Modern Portfolio Theory, Risk Diversification and the Capital Asset Pricing Model (CAPM)
Forward-looking Mean-Variance Optimization (MVO) and its pitfalls
Get an exclusive insight into how MVO is used in Real World (and why it is NOT used in many cases) -> get beyond Investments 101 level!
Calculate Rolling Statistics (e.g. Simple Moving Averages) and aggregate, visualize and report Financial Performance
Create Interactive Charts with Technical Indicators (SMA, Candle Stick, Bollinger Bands etc.)
Part 3 - Capstone Project
Step into the Financial Analyst / Advisor Role and give advice on a Client´s Portfolio (Final Project Challenge).
Apply and master what you have learned before!
Part 4
Some advanced topics on handling Time Series Data with Pandas.
Appendix
Do you struggle with some basic Python / Numpy concepts? Here is all you need to know if you are completely new to Python!
Why you should listen to me...
In my career, I have built an extensive level of expertise and experience in both areas: Finance and Coding
Finance:
10 years experience in the Finance and Investment Industry...
...where I held various quantitative & strategic positions.
MSc in Finance
Passed all three CFA Exams (currently no active member of the CFA Institute)
Python & Pandas:
I led a company-wide transformation from Excel to Python/Pandas
Code, models, and workflows are Real World Project-proven
Instructor of the highest-rated and most trending general Course on Pandas
What are you waiting for? Guaranteed Satisfaction: Otherwise, get your money back with a 30-Days-Money-Back-Guarantee.
Looking Forward to seeing you in the Course!