Recap of the rescue

Introduction to Data Science in Python

Hillary Green-Lerman

Lead Data Scientist, Looker

You did it!

Introduction to Data Science in Python

Modules and variables

  • Modules group functions together
  • Add a module using import
  • import happens at the beginning of a script file
  • Variables store data: strings or floats
import pandas as pd
import numpy as np

Introduction to Data Science in Python

Using functions

  • Perform a task
  • Positional arguments
  • Keyword arguments

Introduction to Data Science in Python

Working with tabular data

  • import pandas as pd
  • DataFrames store tabular data
  • Inspect data using .head() or .info()
  • Select rows using logic
credit_reports[
    credit_report.suspect ==
    'Freddy Frequentist']

Introduction to Data Science in Python

Creating line plots

  • from matplotlib import pyplot as plt
  • Use plt.plot() to create a line plot
  • Modify line plots with keyword arguments
  • Add labels and legends

Introduction to Data Science in Python

More plot types

  • plt.scatter() shows individual data points
  • plt.bar() creates bar charts
  • plt.hist() visualizes distributions

Introduction to Data Science in Python

Great job!

Introduction to Data Science in Python

Preparing Video For Download...