Data Science I with python

STAT 303-1-Sec20

Author

Lizhen Shi

Preface

Welcome to STAT 303-1 (Data Science with Python I), Section 20 at Northwestern University.

This book combines foundational concepts with hands-on practice. Its overall organization was adapted from earlier course materials developed by Professor Arvind Krishna. The chapters, examples, assignments, and technical guidance have since been revised and expanded for the current course.

In this first course, you will:

  • Learn to use essential Python libraries for data science, including but not limited to NumPy, Pandas, and Matplotlib. These three are the main focus, but you will also be introduced to other useful libraries and tools as needed for real-world data analysis.
  • Develop skills in Exploratory Data Analysis (EDA), transforming messy, real-world datasets into meaningful insights through visualization, summarization, and pattern discovery

The book is organized to guide you step-by-step:

  • Review of STAT 201: Python Foundations: Review Python basics and data structures from STAT 201 in two unnumbered chapters. You can use your existing STAT 201 setup for this review. For additional practice, visit the STAT 201 ebook.
  • Setting Up for Data Science (Chapters 1–2): Work in Jupyter notebooks inside VS Code, refresh the Quarto HTML submission workflow, and manage project environments and local data paths. Each chapter ends with a practice activity; Assignment B applies the complete workflow by building the course folder you use for the rest of the quarter.
  • Core Library Foundations (beginning with Chapter 3, Reading Data): Extend your Python programming skills with essential third-party libraries for data science.
  • From Messy to Insight: Prepare, combine, and explore data to answer meaningful questions.
  • Assignments A–G: Begin with Assignment A for prerequisite Python practice, then Assignment B for project setup, followed by Pandas, NumPy, visualization, cleaning, and wrangling. See Canvas for due dates.
  • Geospatial Plotting appendix: optional reference for final projects that involve locations. It is not assigned and has no activity; read it when a project calls for a map.

Throughout the quarter, this resource will be updated and refined to improve clarity, depth, and alignment with our teaching objectives.

As a living document, your feedback and suggestions are always welcome. Contributions from students, instructors, and the broader academic community help make this book stronger and more effective.

If you have ideas for improving the textbook, please share your feedback or suggestions using our dedicated Textbook Improvement Form. Your input is invaluable in making this resource better for everyone.

Thank you for joining us on this learning adventure. We hope this book becomes a valuable companion as you build your skills and confidence in data science with Python.