Respuesta :

Answer:

Gg

Explanation:

The function to change the rows to columns and columns to rows is:

  • np.array

           Numpy is a fundamental library for all scientific computing and all data science. Numpy is a multidimensional array library that can be used to store and all sort all arrays of data.

           The main purpose of using Numpy over List in python is the speed. Numpy is super faster than List because it uses fixed type in binary as compared to List.

           This helps the computer to read lesser bytes of memory in Numpy than List. The use of Numpy is pretty important for all machine learning applications.

           Using a Jupyter Notebook, The first to do when you want to write a code in Numpy is to first import the library.

  • import numpy as np

After importing, the first important thing to know is how to initialize an array. An array is a way of representing datasets into rows and columns.

So, we will just say:

  • a = np.array ( {1,2,3} )      for a 1-dimensional array
  • print (a)
  • [ 1,2,3 ]

From above within the {}, we pass a list {1, 2, 3}

We can also initialize a bit more complex arrays like a 2-dimensional array of floats through the following ways

  • b = np! arrays  ( {9.0, 8.0, 7.0} , {6.0, 5.0, 4.0} )    
  • print (b)
  • [ [9, 8, 7]
  • [6, 5, 4] ]

The function to change the rows to columns is:

  • # get shape
  • b.shape

So, that should print out two by three rows to columns.

Therefore, from the above explanation, we have fully understood what is Numpy and the function used to change the rows to columns, and the columns to rows.

Learn more about Numpy here:

https://brainly.com/question/12907977?referrer=searchResults