Python for SAS Users

Chapter orginization

These chapters are meant to be read in order as they start with foundational concepts used to build up more complex ideas.

Chapter 00 -- Motivation

Chapter 01 -- Introduction

Chapter 02 -- Data Sctructures

       list

       indexing

       tuple

       dictionary

       sequences

       set

       Resources

Chapter 03 -- Data Types and Formatting

       Numerics

       Boolean

       Numerical Precision

       Strings

       String Slicing

       String Formatting

       Resources

Chapter 04 -- Pandas, Part 1

       Importing Packages

       Series

       DataFrames

       Read .csv files

       Inspection

       Missing Values Identification

       Missing Value Replacement

       Resources

Chapter 05 -- Understanding Indexes

       Indices

       .iloc indexer

       Setting and resetting Indicies

       .loc indexer

        Mixing .loc indexer with Boolean Operations

        Altering DataFrame values using the .loc indexer

       Conditionaly Apply Values Based on Another Column Value

        .ix indexer

        Indexing Issues

        Resources

Chapter 06 Hierarchical Indexing

       Multi Indexed Selection

       xs() method for Cross-sections

       Advanced Indexing with .loc Indexer

       Using Boolean Operators with .loc Indexer

       stack() and unstack() methods

       Resources

Chapter 07 -- Pandas, Part 2

       SAS Sort/Merge with by-groups

       Inner Join

       Right Outer Join

       Left Outer Join

       Full Outer Join

       Outer Join no Matched Keys

       Outer Join no Matched Keys in Right

       No Matched Keys in Left

       Many-to-Many Join

       GroupBy: Split-Apply-Combine Introduction

       Replace Missing Values with Group Mean

       FIRST.variable and LAST.variable Processing

        Resources

Chapter 08 -- Date, Time and Timepart Objects

       String Literal Mapped to datetime timestamp

       date objects

       strfime() and strptime() methods

       dateutil.parser

       time objects

       timedelta objects

       Resources

Chapter 09 -- Panda Time Series and Date Handling

       Creating and Manipulating a Fixed Frequency of Dates and Time Spans

       Time-Series Walk-through

       Returning Unique Levels of Categories

       Return a Row Using a Minimum Value

       Return a Row Using a Maximum Value

       Convert Time-Series from one Frequency to Another

       Plotting with bokeh

       Resources

Chapter 10 -- GroupBy

       Setting Display Options

       Read 'pickled' DataFrame

       Create GroupBy Object

       GroupBy with Aggregations

       Understanding Binning

       Applying Functions to Groups

       Applying Transformations to Groups

       Top/Bottom N Processing

       Resources

Chapter 11 -- Panda Readers

       pd.read_csv(URL) method

       SQLAlchemy Under the Covers

       read_sql_table() method

       read_sql_query()method

       DataFrame.to_sql() method

       pd.read_sas() method

       Resources

Chapter 12 -- Additional Data Handling

       Sort and Sort Sequences

       Drop/Keep Columns

       Rename Columns

       Find Duplicate Values

       Drop Duplicate Rows

       Extract Duplicate Values

       Add a New DataFrame Column

       Cast Strings to Float

       Concatenating DataFrames (Join)

       Crosstabs

       Sampling

       Binning Continous Values

       Save to Disk ('pickling')

       Resources