Array in Python- Set 2:

Some of the functions there in arrays are as follows which you can learn in python for data science.

  1. Typecode– This function is helpful in returning the data type through which the array is initialize.
  2. itemsize– This is helpful in knowing the size of single array elements in bytes.
  3. buffer_info()– Returns the storage address of the array and the number of elements in it in the form of a tuple.

Understanding Arrays in Python for Data Science Set 2 - PST Analytics

OUTPUT:

 

  1. count() –It is very useful in counting the number of occurrences of augment in an array.
  2. Extend(arr) – It is useful in appending a whole array which is mention in the argument to another specific array.

Understanding Arrays in Python for Data Science Set 2 - PST Analytics

OUTPUT:

  1. formlist(list) – It helps in appending a list at the end of an array. The list is mentioned in the argument.
  2. tolist() – For transforming an array into a list in python for data science.

Understanding Arrays in Python for Data Science Set 2 - PST Analytics   

OUTPUT:

 

To learn more, you can check this and this.

Leave a Reply

Your email address will not be published. Required fields are marked *