Pandas
Selecting and Indexing
These articles all cover how to index and select data in pandas Series
and DataFrame
s. If you read the articles in order, the topics will build upon one another.
Indexing and Selecting in Pandas (part 1) – the basics, start here
Indexing and Selecting in Pandas – slicing – it turns out pandas slicing can be a bit different than regular Python
Boolean Indexing in Pandas – a core part of pandas usage
Indexing and Selecting in Pandas by Callable
Selecting in Pandas using where and mask – these methods can be quite useful for updating data based on what is in your existing data
Selection in pandas using query – a useful way to select data, and it has performance ramifications
Indexing time series data in pandas – there are special things you can do with a time based index
General pandas usage
Views, Copies, and that annoying SettingWithCopyWarning
Overview of I/O tools in Pandas
Removing duplicate data in Pandas
Iterating over rows in a DataFrame (and should you even do that?)
Using DateOffsets for easy Date manipulation
Options for running DataFrame.apply
in parallel
Basic pandas
Basic Pandas: Moving a DataFrame column
Basic Pandas: Renaming a DataFrame column
Basic Pandas: How to add a column to a DataFrame
Python
Profiling and performance
Profiling Python with cProfile, and a speedup tip – the basic profiler is covered here
Profiling Python code with line_profiler – using line_profiler to diagnose performance issues within individual functions
Profiling Python code with py-spy – using the py-spy sampling profiler against running code
Profiling Python code with memory_profiler – for profiling memory usage in Python code, including line by line
Tools
Using pyenv to manage multiple versions of Python
Managing virtual environments with pyenv
Jupyter
Connecting to your notebook kernel using Jupyter console
Unit testing in Jupyter notebooks
Using the %autoreload magic to make IPython and Jupyter development easier
How to view all your variables in a Jupyter notebook
How to use ipywidgets to make your Jupyter notebooks interactive
4 ways to run Jupyter notebooks
Data
General Data
An introduction to fetching financial data from the SEC’s EDGAR system
Using EDGAR to find and analyze Stock Index data
Various techniques for matching data between different data sources
Financial Market Data
How to connect to Interactive Brokers using Python – the basics
How to get historical market data from Interactive Brokers using Python – pulling down historical bars
3 ways to get historical market data from IEX Cloud
Financial Data Analysis
Financial market data analysis with pandas
Analyzing stock data near events with pandas