Skip to content
  • 📓 CIS 340 Notebook
  • 📋 CIS 340 Schedule
  • ▶ Group Assignments & Presentation Info
    • Group Assignments
    • Data Analysis Group Presentation
  • ▶ Labs
    • ▶ Lab 1: NumPy Arrays
      • Objective
    • ▶ Lab 2: Exploring Summary Statistics with Pandas
      • Objective
    • ▶ Lab 3: Filtering and Sorting
      • Objective
    • ▶ Lab 4: groupby()
      • Objective
  • ▶ 1 Getting Started
    • ▶ Ex 1.1: Intro to Jupyter Notebooks
      • Objective
      • Class Workflow
      • CIS 340 Software and Installs
      • Jupyter Notebooks
      • Markdown
  • ▶ 2 NumPy
    • ▶ Ex 2.1: Intro to NumPy
      • Objective
      • The Data Analytics Ecosystem
      • NumPy ndarrays
    • ▶ 2.2: Indexing and Slicing
      • Objective
      • Basic Indexing and Slicing
      • Importing Data Into NumPy Arrays
  • ▶ 3 Pandas
    • ▶ Ex 3.1: Reading CSV Files
      • Objective
      • Pandas DataFrames
    • ▶ Ex 3.2: Reading Excel Files
      • Objective
      • Bringing Code into Notebooks
      • uv Package Manager
      • More on DataFrame Attributes
      • Understanding Data Types
      • Changing Data Types
    • ▶ Ex 3.3: Custom Datasets & Intro to Git
      • Objective
      • Examining Summary Statistics
      • Creating Custom Datasets
      • Git Version Control
    • ▶ Ex 3.4: Filtering
      • Objective
      • Filtering DataFrames
    • ▶ Ex 3.5: Sorting and Top N
      • Objective
      • Converting Types and Sorting
      • Top and Bottom N
    • ▶ Ex 3.6: Groupby Operations - One Column
      • Objective
      • groupby() One Column
      • Adding New Columns to a DataFrame
    • ▶ Ex 3.7: Groupby Operations - Two Columns
      • Objective
      • groupby() Two Columns

Lab 1: NumPy Arrays:

Description: Download the Lab1-NumPy Arrays.ipynb Jupyter Notebook file. Use NumPy functions, including mean, sum, peak to peak (ptp), median, standard deviation (std), min, and max to calculate grocery store sales that show the answers to the following questions. Submit screengrabs of your code containing the output, similar to the screenshots below.


Expected output: NumPy code cell showing grocery store sales array and mean calculation

 

Expected output: NumPy code cell showing grocery store sales sum calculation

 

Expected output: NumPy code cell showing grocery store sales peak-to-peak (ptp) calculation

 

Expected output: NumPy code cell showing grocery store sales median calculation

 

Expected output: NumPy code cell showing grocery store sales standard deviation calculation

 

Expected output: NumPy code cell showing grocery store sales min and max calculations

← Previous Data Analysis Group Presentation Next → Objective

On this page

  • Lab 1: NumPy Arrays:
  • Description: Download the Lab1-NumPy Arrays.ipynb Jupyter Notebook file. Use NumPy functions, including mean, sum, peak to peak (ptp), median, standard deviation (std), min, and max to calculate grocery store sales that show the answers to the following questions. Submit screengrabs of your code containing the output, similar to the screenshots below.