ndarray as the core data structure
📖 Scenario: You are working with temperature data collected from three cities over four days. The data is organized in a table format, where each row represents a city and each column represents a day.
🎯 Goal: You will create a NumPy ndarray to hold this temperature data, set up a variable for the number of days, extract temperatures for a specific city, and finally print the extracted data.
📋 What You'll Learn
Use NumPy to create an ndarray with exact temperature values
Create a variable to store the number of days
Extract temperatures for the city 'CityB' using ndarray indexing
Print the extracted temperatures
💡 Why This Matters
🌍 Real World
Scientists and analysts often use ndarrays to store and analyze data collected over time or across different locations.
💼 Career
Understanding how to use ndarrays is essential for data scientists and analysts working with numerical data in Python.
Progress0 / 4 steps