Workspace
Croix Laconsay/

Introduction to Statistics in Python

0
Beta
Spinner

Introduction to Statistics in Python

Run the hidden code cell below to import the data used in this course.

# Importing numpy and pandas
import numpy as np
import pandas as pd

# Importing the course datasets
deals = pd.read_csv("datasets/amir_deals.csv")
happiness = pd.read_csv("datasets/world_happiness.csv")
food = pd.read_csv("datasets/food_consumption.csv")

Take Notes

Add notes about the concepts you've learned and code cells with code you want to keep.

Independent events result from events picked with replacement. Dependent events result from events picked without replacement.

# Add your code snippets here

.value_counts() returns a series containing counts of unique values.

counts = amir_deals['products'].value_counts()

The above code looks just at the products column in amir_deals dataframe and counts the types of unique "products" in the dataframe.

  • AI Chat
  • Code