Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Aggregating in 2-D Arrays | Introduction to NumPy
Introduction to Data Analysis in Python
course content

Contenuti del Corso

Introduction to Data Analysis in Python

Introduction to Data Analysis in Python

1. Basics
2. Data Types
3. Control Flow
4. Functions and Modules
5. Introduction to NumPy

book
Aggregating in 2-D Arrays

All the aggregate functions learned in this section can be used along either columns, or rows. To do it, you need to specify the axis parameter within aggregate function.

For example, we can compute the sum of rows and columns elements separately.

1234567
# Import the library import numpy as np # Creating array arr = np.array([[5.2, 3.0, 4.5], [9.1, 0.1, 0.3]]) # Sum of rows and columns elements print(arr.sum(axis = 0)) # columns print(arr.sum(axis = 1)) # rows
copy

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 5. Capitolo 6

Chieda ad AI

expand
ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

course content

Contenuti del Corso

Introduction to Data Analysis in Python

Introduction to Data Analysis in Python

1. Basics
2. Data Types
3. Control Flow
4. Functions and Modules
5. Introduction to NumPy

book
Aggregating in 2-D Arrays

All the aggregate functions learned in this section can be used along either columns, or rows. To do it, you need to specify the axis parameter within aggregate function.

For example, we can compute the sum of rows and columns elements separately.

1234567
# Import the library import numpy as np # Creating array arr = np.array([[5.2, 3.0, 4.5], [9.1, 0.1, 0.3]]) # Sum of rows and columns elements print(arr.sum(axis = 0)) # columns print(arr.sum(axis = 1)) # rows
copy

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 5. Capitolo 6
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt