© 2019

Python for SAS Users

A SAS-Oriented Introduction to Python


Table of contents

  1. Front Matter
    Pages i-xvii
  2. Randy Betancourt, Sarah Chen
    Pages 1-25
  3. Randy Betancourt, Sarah Chen
    Pages 27-63
  4. Randy Betancourt, Sarah Chen
    Pages 65-109
  5. Randy Betancourt, Sarah Chen
    Pages 111-176
  6. Randy Betancourt, Sarah Chen
    Pages 177-241
  7. Randy Betancourt, Sarah Chen
    Pages 243-294
  8. Randy Betancourt, Sarah Chen
    Pages 295-372
  9. Randy Betancourt, Sarah Chen
    Pages 373-409
  10. Back Matter
    Pages 411-434

About this book


Business users familiar with Base SAS programming can now learn Python by example. You will learn via examples that map SAS programming constructs and coding patterns into their Python equivalents. Your primary focus will be on pandas and data management issues related to analysis of data.

It is estimated that there are three million or more SAS users worldwide today. As the data science landscape shifts from using SAS to open source software such as Python, many users will feel the need to update their skills. Most users are not formally trained in computer science and have likely acquired their skills programming SAS as part of their job.

As a result, the current documentation and plethora of books and websites for learning Python are technical and not geared for most SAS users. Python for SAS Users provides the most comprehensive set of examples currently available. It contains over 200 Python scripts and approximately 75 SAS programs that are analogs to the Python scripts. The first chapters are more Python-centric, while the remaining chapters illustrate SAS and corresponding Python examples to solve common data analysis tasks such as reading multiple input sources, missing value detection, imputation, merging/combining data, and producing output. This book is an indispensable guide for integrating SAS and Python workflows.

What You’ll Learn:

  • Quickly master Python for data analysis without using a trial-and-error approach
  • Understand the similarities and differences between Base SAS and Python
  • Better determine which language to use, depending on your needs
  • Obtain quick results


Python SAS Data Science Data Science Python Data Science SAS Python for SAS Users Python for Data Science Data Science Python and SAS SAS How-to for Python SAS and Python New Skills for Data Scientists SAS Functions in Python PROC Python

Authors and affiliations

  1. 1.Chadds FordUSA
  2. 2.LivingstonUSA

About the authors

Randy Betancourt’s professional career has been in and around data analysis. His journey began by managing a technical support group supporting over 2,000 technical research analysts and scientists from the US Environmental Protection Agency at one of the largest mainframe complexes run by the federal government. He moved to Duke University, working for the administration, to analyze staff resource utilization and costs. There, he was introduced to the politics of data access as the medical school had most of the data and computer resources.

He spent the majority of his career at SAS Institute Inc. in numerous roles, starting in marketing and later moving into field enablement and product management. He subsequently developed the role for Office of the CTO consultant.

Randy traveled the globe meeting with IT and business leaders discussing the impact of data analysis to drive their business. And they also discussed challenges they faced. At the same time, he talked to end users, wanting to hear their perspective. Together, these experiences shaped his understanding of trade-offs that businesses make allocating scarce resources to data collection, analysis, and deployment of models.

More recently, he has worked as an independent consultant for firms, including the International Institute of Analytics, Microsoft's SQL Server group, and Accenture's Applied Intelligence platform.

Sarah Chen has 12 years of analytics experience in banking and insurance, including personal auto pricing, compliance, surveillance, fraud analytics, sales analytics, credit risk modeling for business, and regulatory stress testing. She is a Fellow of both the Casualty Actuarial Society and the Society of Actuaries (FCAS, FSA), an actuary, data scientist, and innovator. 

Sarah's career began with five and a half years at Verisk Analytics in the Personal Auto Actuarial division, building predictive models for various ISO products. At Verisk, she learned and honed core skills in data analysis and data management. Her skills and domain expertise were broadened when she moved to KPMG, working with leading insurers, banks, and large online platforms on diverse business and risk management problems. 

Bibliographic information

  • Book Title Python for SAS Users
  • Book Subtitle A SAS-Oriented Introduction to Python
  • Authors Randy Betancourt
    Sarah Chen
  • DOI
  • Copyright Information Randy Betancourt, Sarah Chen 2019
  • Publisher Name Apress, Berkeley, CA
  • eBook Packages Professional and Applied Computing Professional and Applied Computing (R0)
  • Softcover ISBN 978-1-4842-5000-6
  • eBook ISBN 978-1-4842-5001-3
  • Edition Number 1
  • Number of Pages XVII, 434
  • Number of Illustrations 119 b/w illustrations, 0 illustrations in colour
  • Topics Python
  • Buy this book on publisher's site