Trending December 2023 # Python Generators And Iterators In 2 Minutes For Data Science Beginners # Suggested January 2024 # Top 21 Popular

You are reading the article Python Generators And Iterators In 2 Minutes For Data Science Beginners updated in December 2023 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 Python Generators And Iterators In 2 Minutes For Data Science Beginners

This article was published as a part of the Data Science Blogathon


We are continuing our Python: Understanding in 2 minutes series where we cover the medium-level topics that are also frequently asked in Python and Data Science interviews. Last time, we talked about an important topic called *args and **kwargs in 2 minutes. This series is dedicated to aspiring data scientists who want to take the “next step” in Python after learning the basics. Today, we’ll continue our discussion with yet another important topic called Generator and Iterator.

Iterators in Python

The dictionary meaning of “iterate” is to “perform a task repeatedly”.

In computer programming, Wikipedia defines iterators as:

An iterator is an object that enables a programmer to traverse a container, particularly lists.

So, we get the idea that iterators have got to do something with traversing the elements.

Now, what does it mean when something is iterable? It simply means that the items can be looped over. The list is an example of an iterable because we can loop the elements.

Image source: Github user Ethen8181

Let’s try a very simple example by considering this logic. We will first create a list and will try to implement Python’s built-in iter() method to our list.

my_list = [1,2,3,5,8,13] # converting to a list_iterator with iter() final_list = iter(my_list) final_list

The output would look something like this:

Let’s try to implement the next() function to our final_list.




This is the first item on our list.

Again, try doing the same thing:




This is the second item on our list.

One more time:




This is the third item on our list.

So, basically, we get the idea that the iter() method makes converts an iterable item (such as a list) to an iterator.

To summarize:

An iterable is an object that can be converted into an iterator (just the way we converted a list into a list_iterator).

An iterator is an object that has a next() method.

I assume we don’t have any confusion with iterable and iterator now.


Image Source: Morioh

Wikipedia defines Generators as:

One way of implementing iterators is to use a restricted form of coroutine, known as a generator. By contrast with a subroutine, a generator coroutine can yield values to its caller multiple times, instead of returning just once.

We shift our focus to Generators now. Python generators are a simple way of creating iterators. It is a function that returns an object (iterator) which we can iterate over (one value at a time). Let’s see a simple example without a generator and then try to implement a generator to the same operation. We would like to create a function that squares up all the elements in the list. Let’s see how we perform this operation normally.

def square(my_list): result = [] for i in my_list: result.append(i**2) return result

And now, let’s pass a list and see the result.

final = square([1,2,3,4,5]) final


[1, 4, 9, 16, 25]

The process was pretty straightforward. We implemented a function where we initialized a new empty list called “result”. Then, we looped through “my_list” that we wanted to pass and we appended the squared result to our previously empty “result” list one by one. Pretty straightforward, right? And on top of that, it’s calculating everything at once. This means, it’s consuming more memory, and performance-wise, this process may be inefficient.

What if we try out the same thing with a generator?

def square(my_list): for i in my_list: yield i**2

And let’s pass a list:

final = square([1,2,3,4,5]) final


Notice, it created a generator object, and therefore, we can implement a next() function to our final variable. Let’s try:




Let’s do it again!




One more time:




What did we do differently here? In our second example, we created a function like the previous. Then, instead of initializing an empty list, we directly looped through our list to be passed on. In each loop, we yield the corresponding square value and that was it! Finally, we created a “final” variable to pass our intended list. This is our generator. Upon applying the next() method, we obtained the squared values every time. This means, not every result was calculated at once. This is called lazy evaluation in Python. In short, a lazy evaluation is a process in which an object is evaluated when it is needed, not when it is created.

What is “yield” doing?

Yield simply produces a sequence of values. We generally use yield when we want to iterate over a sequence, but the idea is that the yield method doesn’t store the entire sequence in memory but executes only when they are told. Note that you can have multiple yield statements inside a function but you cannot have multiple returns.

Closing up, Generators do not store all the values in memory. They yield one result at a time. They are best for calculating large result sets where you don’t want to allocate the memory for all results at the same time.

In the end

The concepts of iterators, iterable, yield, and generators are mostly intermediate-level stuff that beginners often aren’t familiar with. Also, from my professional experience, these topics are frequently asked in the interview process as well. Understanding these concepts demands practice.

About the Author:

Hi there! My name is Akash and I’ve been working as a Python developer for over 4 years now. In the course of my career, I began as a Junior Python Developer at Nepal’s biggest Job portal site, Merojob. Later, I was involved in Data Science and research at Nepal’s first ride-sharing company, Tootle. Currently, I’ve been actively involved in Data Science as well as Web Development with Django.

You can find my other projects on:

Connect me on LinkedIn

End Notes:

Thanks for reading!

Previous blog posts in this series:

**args and **kwargs in 2 minutes

I am also planning to start The Data Science Blog on my Github page. I will try to include how real companies have been working in the field of Data Science, how to excel in Data Science and/or tech interviews, and other useful content related to Python and general programming. Feel free to check them once in a while.

The media shown in this article are not owned by Analytics Vidhya and are used at the Author’s discretion.


You're reading Python Generators And Iterators In 2 Minutes For Data Science Beginners

Interesting Python Projects With Code For Beginners – Part 2

1. Convert the image to Gray using cv2.COLOR_BGR2GRAY.

cv2.cvtColor(input_image, cv2.COLOR_BGR2GRAY)

2. Finding contours in the image:

To find contours use cv2.findContours().  It takes three parameters: the source image, contour retrieval mode, contour approximation method. This will return a python list of all contours. Contour is nothing but a NumPy array of (x,y) coordinates of boundary points in the object.

3. Apply OCR.

By looping through each contour, take x,y and width, height using cv2.boundingRect() function. Then draw a rectangle function in image using cv2.rectange(). This has five parameters: input image, (x, y), (x+w, y+h), boundary colour for rectangle, size of the boundary.

4. Crop the rectangular region and pass that to tesseract to extract text. Save your content in a file by opening it in append mode.


import cv2 import pytesseract # path to Tesseract-OCR in your computer pytesseract.pytesseract.tesseract_cmd = 'path_to_tesseract.exe' img = cv2.imread("input.png") #input image gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # Converting image to gray scale # performing OTSU threshold # give structure shape and kernel size # kernel size increases or decreases the area of the rectangle to be detected. rect_kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (18, 18)) #dilation on the threshold image dilation = cv2.dilate(img_thresh , rect_kernel, iterations = 1) img_contours, hierarchy = cv2.findContours(dilation, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) im2 = img.copy() file = open("Output.txt", "w+") #text file to save results file.write("") file.close() #loop through each contour for contour in img_contours: x, y, w, h = cv2.boundingRect(contour) rect = cv2.rectangle(im2, (x, y), (x + w, y + h), (0, 255, 0), 2) cropped_image = im2[y:y + h, x:x + w] #crop the text block file = open("Output.txt", "a") text = pytesseract.image_to_string(cropped_image) #applying OCR file.write(text) file.write("n") file.close()

Input image:

Output image:

2. Convert your PDF File to Audio Speech

Say you have some book as PDF to read, but you are feeling too lazy to scroll; how good it would be then if that PDF is converted to an audiobook. So, let’s implement this using python.

We will need these two packages:

pyttsx3: It is for Text to Speech, and it will help the machine speak.

PyPDF2: It is a PDF toolkit. It is capable of extracting document information, merging documents, etc.

Install them using these commands:

pip install pyttsx3 pip install PyPDF2


Import the required modules.

Use PdfFileReader() to read PDF file.

getPage() method is used to select the page to be read from.

Extract the text using extract text().

By using pyttx3, speak out the text.


# import the modules import PyPDF2 import pyttsx3 # path of your PDF file path = open('Book.pdf', 'rb') # PdfFileReader object pdfReaderObj = PyPDF2.PdfFileReader(path) # the page with which you want to start from_page = pdfReaderObj.getPage(12) content = from_page.extractText() # reading the text speak = pyttsx3.init() speak.say(content) speak.runAndWait()

That’s it! It will do the job. This small code is beneficial to you when you don’t want to read; you can hear.

Next, you can provide a GUI to this project using tikinter or anything else. You can give a GUI to enter the pdf path, the page number to start from, a stop button. Try this!

Let’s move to the next project.

3. Reading mails and downloading attachments from the mailbox

Let’s understand what the benefit of reading the mailbox with Python is. So, let’s suppose if we are working on a project where some data comes daily in word or excel, which is required for the script as input or to Machine learning model as input. So, if you have to download this data file daily and give it to the hand, it will be hectic. But if we can automate this step, read this file, and download the required attachment, it would be a great help. So, let’s implement this.

We will use pywin32 to implement automatic attachment download from a particular mail. It can access Windows applications like Excel, PowerPoint, Word, Outlook, etc., to perform some actions. We will focus on Outlook and download attachments from the outlook mailbox.

Note: This does not need authentication like user email id or password. It can access Outlook that is already logged in to your machine. (Keep the outlook app open while running the script).

In the above example, we chose smtplib because it can only send emails and not download attachments. So, we will go with pywin32 to download attachments from Outlook, and it will be pretty straightforward. Let’s look at the code.

Command to install: pip install pywin32

Import module

import win32com.client

Now, establish a connection to Outlook.

outlook = win32com.client.Dispatch(“Outlook.Application”).GetNamespace(“MAPI”)

Let’s try to access Inbox:

inbox = outlook.GetDefaultFolder(number)

This function takes a number/integer as input which will tell the index of the inbox folder in our outlook app.

To check the index of all folders, just run this code snippet:

import win32com.client outlook=win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI") for i in range(50): try: box = outlook.GetDefaultFolder(i) name = box.Name print(i, name) except: pass


3 Deleted Items 4 Outbox 5 Sent Items 6 Inbox 9 Calendar

As you can see in the output Inbox index is 6. So we will use 6 in the function.

inbox = outlook.GetDefaultFolder(6)

If you want to print the subject of all the emails in the inbox, use this:

messages = inbox.Items # get the first email message = messages.GetFirst() # to loop through all the email in the inbox while True: try: print(message.subject) # get the subject of the email message = messages.GetNext() except: message = messages.GetNext()

There are other properties also like “message. subject”, “message. senton”, which can be used accordingly.

Downloading Attachment

If you want to print all the names of attachments in a mail:

for attachment in message.Attachments: print(attachment.FileName)

Let’s download an attachment (an excel file with extension .xlsx) from a specific sender.

import win32com.client import re import os outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI") inbox = outlook.GetDefaultFolder(6) messages = inbox.Items message = messages.GetFirst() while True: try: if'Data Report', str(message.Subject).lower()) != None and"ABC prasad", str(message.Sender).lower()) != None: attachments = message.Attachments for attachment in message.Attachments: if ".xlsx" in attachment.FileName or ".XLSX" in attachment.FileName: attachment_name = str(attachment.FileName).lower() attachment.SaveASFile(os.path.join(download_folder_path, attachment_name)) else: pass message = messages.GetNext() except: message = messages.GetNext() exit Explanation

This is the complete code to download an attachment from Outlook inbox. Inside try block, you can change conditions. For example, I am searching for those mails which have subjects such as Data Report and Sender name “ABC prasad”. So, it will iterate from the first mail in the inbox, and if the condition gets true, it will then look if that particular mail has an attachment with the extension .xlsx or .XLSX. So you can change all these things subject, sender, file type and download the file you want. Once it finds the file, it is saved to a path given as “download_folder_path”.

End Notes

We discussed three projects in a previous article and three in this article. I hope these python projects with codes helped you to polish your skill set. Just do some hands-on and try these; you will enjoy coding them. I hope you find this article helpful. Let’s connect on Linkedin.

Thanks for reading 🙂

Happy coding!

The media shown in this article is not owned by Analytics Vidhya and are used at the Author’s discretion. 

Python Numpy Tutorial For Beginners: Learn With Examples

What is NumPy in Python?

NumPy is an open source library available in Python, which helps in mathematical, scientific, engineering, and data science programming. It is a very useful library to perform mathematical and statistical operations in Python. It works perfectly for multi-dimensional arrays and matrix multiplication. It is easy to integrate with C/C++ and Fortran.

For any scientific project, NumPy is the tool to know. It has been built to work with the N-dimensional array, linear algebra, random number, Fourier transform, etc.

NumPy is a programming language that deals with multi-dimensional arrays and matrices. On top of the arrays and matrices, NumPy supports a large number of mathematical operations. In this part, we will review the essential functions that you need to know for the tutorial on ‘TensorFlow.’

Why use NumPy?

NumPy is memory efficiency, meaning it can handle the vast amount of data more accessible than any other library. Besides, NumPy is very convenient to work with, especially for matrix multiplication and reshaping. On top of that, NumPy is fast. In fact, TensorFlow and Scikit learn to use NumPy array to compute the matrix multiplication in the back end.

In this Python NumPy Tutorial, we will learn:

How to Install NumPy

To install NumPy library, please refer our tutorial How to install TensorFlow. NumPy is installed by default with Anaconda.

In remote case, NumPy not installed-

You can install NumPy using Anaconda:

conda install -c anaconda numpy

In Jupyter Notebook :

import sys !conda install --yes --prefix {sys.prefix} numpy Import NumPy and Check Version

The command to import numpy is:

import numpy as np

Above code renames the Numpy namespace to np. This permits us to prefix Numpy function, methods, and attributes with ” np ” instead of typing ” numpy.” It is the standard shortcut you will find in the numpy literature

To check your installed version of NumPy, use the below command:

print (np.__version__)


1.18.0 What is Python NumPy Array?

NumPy arrays are a bit like Python lists, but still very much different at the same time. For those of you who are new to the topic, let’s clarify what it exactly is and what it’s good for.

As the name kind of gives away, a NumPy array is a central data structure of the numpy library. The library’s name is actually short for “Numeric Python” or “Numerical Python”.

Creating a NumPy Array

Simplest way to create an array in Numpy is to use Python List

myPythonList = [1,9,8,3]

To convert python list to a numpy array by using the object np.array.

numpy_array_from_list = np.array(myPythonList)

To display the contents of the list



array([1, 9, 8, 3])

In practice, there is no need to declare a Python List. The operation can be combined.

a = np.array([1,9,8,3])

NOTE: Numpy documentation states use of np.ndarray to create an array. However, this the recommended method.

You can also create a numpy array from a Tuple.

Mathematical Operations on an Array

You could perform mathematical operations like additions, subtraction, division and multiplication on an array. The syntax is the array name followed by the operation (+.-,*,/) followed by the operand


numpy_array_from_list + 10


array([11, 19, 18, 13])

This operation adds 10 to each element of the numpy array.

Shape of Array

You can check the shape of the array with the object shape preceded by the name of the array. In the same way, you can check the type with dtypes.

import numpy as np a = np.array([1,2,3]) print(a.shape) print(a.dtype) (3,) int64

An integer is a value without decimal. If you create an array with decimal, then the type will change to float.

#### Different type b = np.array([1.1,2.0,3.2]) print(b.dtype) float64 2 Dimension Array

You can add a dimension with a “,”coma

Note that it has to be within the bracket []

### 2 dimension c = np.array([(1,2,3), (4,5,6)]) print(c.shape) (2, 3) 3 Dimension Array

Higher dimension can be constructed as follow:

### 3 dimension d = np.array([ [[1, 2,3], [4, 5, 6]], [[7, 8,9], [10, 11, 12]] ]) print(d.shape) (2, 2, 3)

Objective Code

Create array array([1,2,3])

print the shape array([.]).shape

What is numpy.zeros()?

numpy.zeros() or np.zeros Python function is used to create a matrix full of zeroes. numpy.zeros() in Python can be used when you initialize the weights during the first iteration in TensorFlow and other statistic tasks.

numpy.zeros() function Syntax

numpy.zeros(shape, dtype=float, order='C')

Python numpy.zeros() Parameters


Shape: is the shape of the numpy zero array

Dtype: is the datatype in numpy zeros. It is optional. The default value is float64

Order: Default is C which is an essential row style for numpy.zeros() in Python.

Python numpy.zeros() Example

import numpy as np np.zeros((2,2))


array([[0., 0.], [0., 0.]])

Example of numpy zero with Datatype

import numpy as np np.zeros((2,2), dtype=np.int16)


array([[0, 0], [0, 0]], dtype=int16) What is numpy.ones()?

np.ones() function is used to create a matrix full of ones. numpy.ones() in Python can be used when you initialize the weights during the first iteration in TensorFlow and other statistic tasks.

Python numpy.ones() Syntax

numpy.ones(shape, dtype=float, order='C')

Python numpy.ones() Parameters


Shape: is the shape of the chúng tôi Python Array

Dtype: is the datatype in numpy ones. It is optional. The default value is float64

Order: Default is C which is an essential row style.

Python numpy.ones() 2D Array with Datatype Example

import numpy as np np.ones((1,2,3), dtype=np.int16)


array([[[1, 1, 1], [1, 1, 1]]], dtype=int16)

numpy.reshape() function in Python

Python NumPy Reshape function is used to shape an array without changing its data. In some occasions, you may need to reshape the data from wide to long. You can use the np.reshape function for this.

Syntax of np.reshape()

numpy.reshape(a, newShape, order='C')


a: Array that you want to reshape

newShape: The new desires shape

Order: Default is C which is an essential row style.

Example of NumPy Reshape

import numpy as np e = np.array([(1,2,3), (4,5,6)]) print(e) e.reshape(3,2)


[[1 2 3] [4 5 6]] array([[1, 2], [3, 4], [5, 6]])

numpy.flatten() in Python

Python NumPy Flatten function is used to return a copy of the array in one-dimension. When you deal with some neural network like convnet, you need to flatten the array. You can use the np.flatten() functions for this.

Syntax of np.flatten()


Order: Default is C which is an essential row style.

Example of NumPy Flatten



array([1, 2, 3, 4, 5, 6])

What is numpy.hstack() in Python?

Numpy.hstack is a function in Python that is used to horizontally stack sequences of input arrays in order to make a single array. With hstack() function, you can append data horizontally. It is a very convenient function in NumPy.

Lets study hstack in Python with an example:


## Horitzontal Stack import numpy as np f = np.array([1,2,3]) g = np.array([4,5,6]) print('Horizontal Append:', np.hstack((f, g)))


Horizontal Append: [1 2 3 4 5 6]

What is numpy.vstack() in Python?

Numpy.vstack is a function in Python which is used to vertically stack sequences of input arrays in order to make a single array. With vstack() function, you can append data vertically.

Lets study it with an example:


## Vertical Stack import numpy as np f = np.array([1,2,3]) g = np.array([4,5,6]) print('Vertical Append:', np.vstack((f, g)))


Vertical Append: [[1 2 3] [4 5 6]]

After studying NumPy vstack and hstack, let’s learn an example to generate random numbers in NumPy.

Generate Random Numbers using NumPy

To generate random numbers for Gaussian distribution, use:

numpy.random.normal(loc, scale, size)


Loc: the mean. The center of distribution

Scale: standard deviation.

Size: number of returns


## Generate random nmber from normal distribution normal_array = np.random.normal(5, 0.5, 10) print(normal_array) [5.56171852 4.84233558 4.65392767 4.946659 4.85165567 5.61211317 4.46704244 5.22675736 4.49888936 4.68731125]

If plotted the distribution will be similar to following plot

Example to Generate Random Numbers using NumPy

NumPy Asarray Function

The asarray()function is used when you want to convert an input to an array. The input could be a lists, tuple, ndarray, etc.


numpy.asarray(data, dtype=None, order=None)[source]


data: Data that you want to convert to an array

dtype: This is an optional argument. If not specified, the data type is inferred from the input data

Order: Default is C which is an essential row style. Other option is F (Fortan-style)


Consider the following 2-D matrix with four rows and four columns filled by 1

import numpy as np A = np.matrix(np.ones((4,4)))

If you want to change the value of the matrix, you cannot. The reason is, it is not possible to change a copy.

np.array(A)[2]=2 print(A) [[1. 1. 1. 1.] [1. 1. 1. 1.] [1. 1. 1. 1.] [1. 1. 1. 1.]]

Matrix is immutable. You can use asarray if you want to add modification in the original array. Let’s see if any change occurs when you want to change the value of the third rows with the value 2.

np.asarray(A)[2]=2 print(A)

Code Explanation:

np.asarray(A): converts the matrix A to an array

[2]: select the third rows


[[1. 1. 1. 1.] [1. 1. 1. 1.] [2. 2. 2. 2.] # new value [1. 1. 1. 1.]] What is numpy.arange()?

numpy.arange() is an inbuilt numpy function that returns an ndarray object containing evenly spaced values within a defined interval. For instance, you want to create values from 1 to 10; you can use np.arange() in Python function.


numpy.arange(start, stop, step, dtype)

Python NumPy arange Parameters:

Start: Start of interval for np.arange in Python function.

Stop: End of interval.

Step: Spacing between values. Default step is 1.

Dtype: Is a type of array output for NumPy arange in Python.


import numpy np np.arange(1, 11)


array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])


If you want to change the step in this NumPy arange function in Python example, you can add a third number in the parenthesis. It will change the step.

import numpy np np.arange(1, 14, 4)


array([ 1, 5, 9, 13]) NumPy Linspace Function

Linspace gives evenly spaced samples.


numpy.linspace(start, stop, num, endpoint)


Start: Starting value of the sequence

Stop: End value of the sequence

Num: Number of samples to generate. Default is 50

Endpoint: If True (default), stop is the last value. If False, stop value is not included.


For instance, it can be used to create 10 values from 1 to 5 evenly spaced.

import numpy as np np.linspace(1.0, 5.0, num=10)


array([1. , 1.44444444, 1.88888889, 2.33333333, 2.77777778, 3.22222222, 3.66666667, 4.11111111, 4.55555556, 5. ])

If you do not want to include the last digit in the interval, you can set endpoint to false

np.linspace(1.0, 5.0, num=5, endpoint=False)


array([1. , 1.8, 2.6, 3.4, 4.2]) LogSpace NumPy Function in Python

LogSpace returns even spaced numbers on a log scale. Logspace has the same parameters as np.linspace.


numpy.logspace(start, stop, num, endpoint)


np.logspace(3.0, 4.0, num=4)


array([ 1000. , 2154.43469003, 4641.58883361, 10000. ])

Finaly, if you want to check the memory size of an element in an array, you can use itemsize




Each element takes 16 bytes.

Indexing and Slicing in Python


## Slice import numpy as np e = np.array([(1,2,3), (4,5,6)]) print(e) [[1 2 3] [4 5 6]]

Remember with numpy the first array/column starts at 0.

## First column print('First row:', e[0]) ## Second col print('Second row:', e[1])


First row: [1 2 3] Second row: [4 5 6]

In Python, like many other languages,

The values before the comma stand for the rows

The value on the rights stands for the columns.

If you want to select a column, you need to add : before the column index.

: means you want all the rows from the selected column.

print('Second column:', e[:,1]) Second column: [2 5]

To return the first two values of the second row. You use : to select all columns up to the second

## Second Row, two values print(e[1, :2]) [4 5] Statistical Functions in Python

NumPy has quite a few useful statistical functions for finding minimum, maximum, percentile standard deviation and variance, etc from the given elements in the array. The functions are explained as follows −

Numpy is equipped with the robust statistical function as listed below

Function Numpy

Min np.min()

Max np.max()

Mean np.mean()

Median np.median()

Standard deviation np.std()

Consider the following Array:


import numpy as np normal_array = np.random.normal(5, 0.5, 10) print(normal_array)


[5.56171852 4.84233558 4.65392767 4.946659 4.85165567 5.61211317 4.46704244 5.22675736 4.49888936 4.68731125]

Example of NumPy Statistical function

### Min print(np.min(normal_array)) ### Max print(np.max(normal_array)) ### Mean print(np.mean(normal_array)) ### Median print(np.median(normal_array)) ### Sd print(np.std(normal_array))


4.467042435266913 5.612113171990201 4.934841002270593 4.846995625786663 0.3875019367395316 What is numpy dot product? product is a powerful library for matrix computation. For instance, you can compute the dot product with chúng tôi chúng tôi product is the dot product of a and b. in Python handles the 2D arrays and perform matrix multiplications.

Syntax:, y, out=None)



x,y: Input arrays. x and y both should be 1-D or 2-D for the function to work

out: This is the output argument for 1-D array scalar to be returned. Otherwise ndarray should be returned.


The function in Python returns a Dot product of two arrays x and y. The dot() function returns a scalar if both x and y are 1-D; otherwise, it returns an array. If ‘out’ is given then it is returned.


Dot product in Python raises a ValueError exception if the last dimension of x does not have the same size as the second last dimension of y.


## Linear algebra ### Dot product: product of two arrays f = np.array([1,2]) g = np.array([4,5]) ### 1*4+2*5, g)


14 Matrix Multiplication in Python

The Numpy matmul() function is used to return the matrix product of 2 arrays. Here is how it works

1) 2-D arrays, it returns normal product

3) 1-D array is first promoted to a matrix, and then the product is calculated


numpy.matmul(x, y, out=None)


x,y: Input arrays. scalars not allowed

out: This is optional parameter. Usually output is stored in ndarray


In the same way, you can compute matrices multiplication with np.matmul

### Matmul: matruc product of two arrays h = [[1,2],[3,4]] i = [[5,6],[7,8]] ### 1*5+2*7 = 19 np.matmul(h, i)


array([[19, 22], [43, 50]]) Determinant

Last but not least, if you need to compute the determinant, you can use np.linalg.det(). Note that numpy takes care of the dimension.


## Determinant 2*2 matrix ### 5*8-7*6np.linalg.det(i)


-2.000000000000005 Summary

NumPy is an open source library available in Python, which helps in mathematical, scientific, engineering, and data science programming.

numpy.zeros() or np.zeros Python function is used to create a matrix full of zeroes.

numpy.ones() in Python can be used when you initialize the weights during the first iteration in TensorFlow and other statistic tasks.

Python NumPy Reshape function is used to shape an array without changing its data.

Python NumPy Flatten function is used to return a copy of the array in one-dimension.

Numpy.hstack is a function in Python that is used to horizontally stack sequences of input arrays in order to make a single array.

Numpy.vstack is a function in Python which is used to vertically stack sequences of input arrays in order to make a single array.

numpy.arange() is an inbuilt numpy function that returns an ndarray object containing evenly spaced values within a defined interval. product is a powerful library for matrix computation.

The Numpy matmul() function is used to return the matrix product of 2 arrays.

Science Helped Me Run My First Marathon In 3 Hours And 21 Minutes

UNTIL JUNE 2023, I HAD NEVER RUN more than 14 miles at once. I jogged often, and had completed a couple of half-marathons, but nothing more. As such, doubling that distance seemed far out of my reach.

But shortly after, I was given the opportunity to gain a spot reserved for media to run the 2023 Chicago Marathon in October (through Nike, one of the marathon’s official sponsors). With access to top-level coaching and gear, I had an opportunity to see how elite athletes set themselves up for success—and I wanted to find out what the average human can learn from their tricks. I set out to understand how evolution, technology, and know-how can come together to propel the human body across 26.2 miles. Here’s what I learned, and how it can help you run a marathon of your own.

00.00 miles

At first glance, nothing in my background suggested I could run such a long course. I participated in a few sports in high school, but not track or cross country. My dad jogs strictly for health reasons, my mother abhors the suggestion, and I don’t have any sprinters hiding up my family tree. But many scientists and anthropologists maintain that you don’t need to be from a long line of elites; the skill is in our DNA. Christopher McDougall argues in the runner’s cult classic Born to Run that evolution hard-wired the human body for jogging. The hypothesis goes that back when Homo sapiens and Neanderthals shared hunting territory, our super power as a species was our ability to chase down prey by steadily trotting behind it until the animal collapsed from exhaustion—what anthropologists call persistence hunting. Small pockets of modern hunter-gatherer societies, such as the Kalahari Bushman of southern Africa and the Tarahumara (or Rarámuri) people of Mexico’s Chihuahua region, still use this method, albeit far more infrequently.

Getting your body ready for a marathon means ensuring your muscles will be able to perform for 26.2 miles. That’s where proper training comes in—which enables you to run faster and for longer before your muscles fail you. Stan Horaczek

While humans aren’t as fast as some sprinters in the animal kingdom, we rule at endurance because of a key physiological difference. To cool off, other mammals expel extra heat by panting. It’s a great method—until they start running and all of a sudden their bodies need deep breaths of oxygen to keep going. Unable to pant and breathe at the same time, they ultimately overheat and collapse. Humans have a marvelous workaround: Because we sweat through pores in our skin, we’re able to keep our respiration steady as we trot. Our species’ history means that most healthy humans should be able to jog a marathon.

03.10 miles

Like running a marathon itself, training for one is most fun at the start. But fMRI studies show that our brains react to novel experiences by releasing the feel-good neurotransmitter dopamine. Surprised by the resulting happiness, we seek out the reward again and again. That scientific insight certainly applied to me: I had never trained rigorously for a race before this one, so each workout was an entirely new experience. That’s my first takeaway: You shouldn’t assume the process will be miserable or grueling. It’s going to be difficult, but the fact that it’s new will make it kind of addictive.

RELATED: Humans are natural runners—and this ancient gene mutation might have helped

The exact amount of time it takes for someone to train varies. Elite or professional runners who already have a high level of conditioning, or physical strength, might need as little as 12 weeks, whereas someone with little or no experience might require 6 months or more. I had recently run a half-marathon, and hadn’t lost much of my conditioning. My heart, lungs, and muscles still worked together efficiently as I ran. My coach, a Nike-affiliated trainer named Jes Woods, decided to give me a 14-week training plan.

Getting your body ready for a marathon means ensuring your muscles will be able to perform for 26.2 miles. That ability, and how fast you can complete the distance in, depends on a multitude of factors including weight, sex, genetics (to a certain extend), and the energy efficiency of our form. Even tiny things that are almost unnoticeable can make a difference. For instance, Woods pointed out that I tend to cross my arms in front of me, which is inefficient. Some runners tend to strike the ground heel first, also not optimal. Your performance also depends on what shape or condition you are in, what many people colloquially call fitness. That’s where proper training comes in—which enables you to run faster and for longer before your muscles fail you.

Ambitiously, I told Woods that I wanted to run the race somewhere in the range of three hours and 40 minutes—fast but not crazy-fast. For reference, qualifying times for the Boston Marathon are, as of 2023, three hours and thirty minutes for women in my age group (18-34) and three hours flat for men of my same cohort. The Boston Marathon is unique in that you must qualify to compete, whereas others, like my race, the Chicago Marathon, is lottery-based. I chose my goal time based on how I did in my most recent half-marathon. Running at about an 8-minute-mile pace, I remembered being tired but not exhausted, and I recovered quickly; there was definitely room for improvement. Woods conservatively said we’d start with that goal and see how I did. Fitness builds up slowly. It’s hard to predict how someone without years of experience will react to an increase in mileage.

For both long runs and total weekly mileage, the number of miles ebbed and flowed, with “down” weeks with less miles and “up” weeks with more. Keeping track of this process with a running watch or simply pen and paper can be a key tool. Stan Horaczek

Luckily for me, Woods is an expert. Whatever query I had, she always had the answer. And I had many: How long is the break between these two sets? What actually is a progression run? Should I get one of those belt things that holds your hydration gels?

Her quick, detailed, and accurate answers were vital, but even more valuable was the security I gained from them. A runner’s coach erects an athlete’s confidence like a brick wall: Each tailored workout, question answered, and shared training session slowly builds a sturdy base of self-assurance and a barrier between the runner and any misgivings. A coach is by no means necessary. But if you’ve got the resources to hire one, it’s definitely helpful.

My curated plan included four different phases (or “blocks”) of workouts: base (with paces that matched my current fitness state), initial, transition, and final (with paces that were a bit faster than my goal for the marathon). The first three phases lasted a month each, and the last one two weeks.

I followed the same workout pattern throughout: Mondays I cross-trained (almost exclusively by swimming, a sport I’d competed in through high school). Tuesdays I usually did some type of track workout focused on speed rather than endurance. On Wednesdays I always did a recovery run, a less-demanding pace that encourage muscle growth. Thursdays meant either hill repeats (just as it sounds: You run up a hill and then back down, just so you can tackle the beast again) or a sustained speed run. These runs are faster than a marathon pace but are performed for a shorter period of time. An ideal example is a tempo run, which is a steady clip that’s just below your maximum effort. Woods explained it to me as a speed you could handle for an hour (if necessary). Fridays were a rest day. Saturdays were reserved for crucial long runs, and on Sundays I could choose between a recovery run and a rest day, though I almost always chose to run.

An example of one week’s schedule, week 9, which was midway through training. Most weeks followed this same routine, with different workouts and varying long run miles. Having a routine—and sticking to it—helped keep me focused and accountable. Infographic by Sara Chodosh

With each new phase, my marathon pace (the time per mile that I could run steadily) would improve, and as Woods slowly increased my mileage and the speed, the times within the phases increased as well. For both long runs and total weekly mileage, the number of miles ebbed and flowed, with “down” weeks with less miles and “up” weeks with more. This allows your body to further recover throughout the process. Woods also tried to keep my longest runs slow, but, as it turns out, I hate a good slow jog, so she set a limit of no faster than an 8:30 minute per mile pace for any recovery, easy, or long run—no exceptions. For ideal training, though, long runs should be at a pace that is about 60 to 90 seconds slower than your goal speed for the marathon.

13.1 miles

Somewhat counterintuitively, the hardest workouts for me to nail were the Wednesday recovery runs. Running slowly—knowing you are physically capable of going much faster—is a mental struggle. However, as Woods routinely pointed out, recovery runs are crucial. Prior to this training, I’d prepared for all road races the same way: Run at the same pace for an increasing number of miles. Sadly, I was way behind on the evidence-based best practices. Seriously: If you want to get faster, sometimes you gotta go slow.

Recovery runs, which indeed sound like an oxymoron, are an important counterpart to speed workouts. The latter ever so slightly breaks down the muscles, causing tiny tears that heal over with more muscle cells: a net gain. But this can happen only if you give the muscles a chance to recover. You have to have rest days if you want to put on muscle, and if you’re training for a marathon, you have to spend some days running at a maddeningly slow pace.

You also have to get used to running for long periods of time. Each week, I logged more miles, starting at 8 and culminating with two 20-mile runs six weeks and four weeks before the race. This is crucial for training the mind to handle marathon day. The more runs you do, the more familiar you become with them. And though they don’t actually get shorter, you’ll get better at tuning out the passage of time and focusing on your body’s machinations.

Marathon training includes “down” weeks with less miles and “up” weeks with more. This allows your body to further recover throughout the process. But overall, the weekly and long run miles steadily increased in the weeks of training leading to the race. Infographic by Sara Chodosh

18 miles

As I was puffing up the same slope for the fifth time one morning—my last hill workout, just a few weeks before the race—I found myself falling off pace by a second or two with each additional climb. I remember wondering if a fancier shoe might give me the boost I needed to keep up my speed. That wasn’t total fantasy: What you put on your body—and especially your feet—makes a difference. Items such as a properly fitting bra, for example, can make all the difference.

The brunt of running research has gone into sneaker tech, and running shoes have come a long way. Designers have modified for better comfort, support, grip, and tread. The focus these days is on the shoe’s energy return and weight: More of the former and the less of the latter means a faster performance. With each stride, muscles generate energy. Some of that power transfers down to the shoes. Energy return, then, is the percent of that energy a shoe gives back as a runner lifts up the foot—and it comes largely from the foam inside the midsole. It should be both compliant (to stretch and hold that energy) and resilient (to give it back). Researchers started experimenting with this concept in the 1980s, but it was Adidas’ 2013 launch of its Energy Boost shoes that reignited the trend. Since then, companies including Brooks, Nike, Reebok, and Saucony have followed suit with their own models.

The Vaporfly 4 percent, so named because they’re meant to make the average runner 4 percent more efficient, are Nike’s fastest racing shoes (kicks meant for race day as opposed to training) and the ones I used for my race. They’re ultralight: Biomechanical studies show that, on average, every 100 grams of added mass per shoe increases the metabolic cost of running by 1 percent. They have a new proprietary foam called ZoomX, and boast a somewhat-controversial carbon-fiber plate that propels a runner forward. In a marathon, researchers say, a 4 percent improvement could make a huge difference.

Tests at the University of Colorado Boulder and at Grand Valley State University came to the same conclusion: The shoes have got speed. So much so that some coaches and exercise scientists have questioned whether they should be banned. But not every runner who toes the line in the racing shoes consistently experiences the same improvement. In fact, some study participants got more than a 4 percent boost while others saw far less. That inconsistency makes sense, because no one is quite sure how the shoes provide such a good return. Some think it’s all about the notorious carbon-fiber plate, while others suspect the boost is all in the super-responsive ZoomX foam.

We need more data—and more varieties of foam and carbon-fiber plates to test—to know for sure. They might be on the way. Professional distance runner Des Linden, who’s sponsored by Brooks Running, ran the 2023 Boston and New York City marathons in a Brooks’ prototype shoe believed to have a plate—and other companies are rumored to be developing similar tech.

But it’s not merely tech that makes us faster. Another runner with me on my hill workout day told me he’s “old-school” and thinks high-tech-shoe claims miss a big point: For most non-elite runners, anyone can run a faster marathon on any given day, regardless of what’s on their feet, given they put in the proper training. And studies back him up, as there are so many variables that affect performance. According to Wouter Hoogkamer and Rodger Kram, physiologists and biomechanics who study running economy and shoe technology at the University of Colorado Boulder, the bulk of the work still comes from the runner. Even if a shoe were to give 100 percent energy return, that’s paltry compared with the power that muscles provide with each stride. Training status, Hoogkamer told me, is by far the most important parameter.

The bottom line: Some shoes will give you a shot at running faster, but you still need to be in damn good shape to run your fastest marathon. For me, that meant finishing those hills.

Running slowly—knowing you are physically capable of going much faster—is a mental struggle. However, as recovery runs are crucial. If you want to get faster, sometimes you gotta go slow. Stan Horaczek

24 miles

I ran the Chicago Marathon as if riding a train fueled by adrenaline—until I was just about to hit mile 24. Suddenly I had an extreme desire to stop. All runners experience this at some point late in the race, I’d been told. And while there are a million and one tactics you can use to get yourself through, working out my mind helped the most.

Paces, mileage, and physiological numbers such as VO2 max (the upper limit of oxygen consumption used during exertion) or lactate threshold can dictate how well someone will do. But it’s nearly impossible to crunch those numbers into a perfect prediction of someone’s finish time, which I found fascinating. No matter how well you prepare physically, your brain can still do a lot to help or hurt you on race day.

In his latest book, Endure, Alex Hutchinson defines endurance as “the struggle to continue against a mounting desire to stop.” Because the body wants to conserve energy, and distance running uses so much, your mind is going to tell you to stop moving far sooner than your body will actually break of exhaustion. You can usually keep going for a bit after you begin to feel certain that you can’t.

Scientists have done multiple studies of this phenomenon, but perhaps my favorite involved the tactic I remember as the swish and spit. To prevent themselves from running out of available energy, marathoners swallow gels—single-portion packets of easy-to-digest carbohydrates—throughout the race. Once I’d hit 16 miles in my training, I knew I had to start practicing with them to make it through the length of a marathon. I’d been dreading this. Not to get too much into the details, but every time I’d tried to use them in the past, I’d throw them right back up. I blame a super sensitive stomach, not enough blood flow to the gut while running, and the strange texture of the products themselves (you’ll know once you try ’em).

Searching for a workaround sent me down a PubMed-fueled research spiral on how to take in carbohydrates, and I came across a 2010 paper entitled “Mouth rinse but not ingestion of a carbohydrate solution improves 1-h cycle time trial performance.” Boom. Exactly what I was looking for: I don’t need to actually swallow the stuff, I can just rinse and spit.

The study found that during a 60-minute cycling session, participants who swished a sports drink containing carbohydrates and spat it out performed better than those who did the same with a non-carbohydrate containing placebo (meant to taste like a sports drink). That’s because our mouths contain carbohydrate sensors linked to the brain—detectors that tell our bodies it’s okay to keep going because fuel is on the way. With just the knowledge of energy coming, sans any actual food, participants in the study cycled faster than those who swished the placebo, which didn’t trigger the same brain signals.

26.2 miles

I crossed the finish line of the Chicago Marathon in 3 hours, 21 minutes, 55 seconds—about eight minutes faster than the qualifying standard for the Boston Marathon, and almost 20 minutes faster than the time I initially had planned.

RELATED: How to make exercise a regular part of your life

It’s hard to pinpoint exactly what made me surpass my initial goals. I imagine a battery of tests would help: looking at genes related to running economy, gait analysis, even a breakdown of my gut microbiome. But I bet that we’ll never be able to predict anyone’s marathon time with 100 percent accuracy, which, to me, is the fun of it all.

Perhaps the best takeaway I can share is that as soon as it was over, I forgot almost instantly both the mental and muscular struggle I’d just endured. Some psychological studies have shown this to be a common phenomenon in distance runners. In one study, runners were asked how painful the marathon was directly after the race and then three and six months later. On average, all subjects remembered less pain overall in the months following the marathon compared to the day of the event.

Forcing yourself to the finish line takes time, support, and patience. But the end result is worth the effort. Ask anyone who’s run a marathon how many they’ve completed. Chances are, it’s more than one. If you’re ready to run a marathon, trust that your body is designed to go the distance, and consider using the latest technology for a slight speed boost. Just remember: You have to put in the work. But my end result surprised me—and yours could, too. We’re all runners, after all.

How To Develop A Career In Ai And Data Science

Also see: Top 15 Data Warehouse Tools

It’s safe to assume that job openings – lucrative job openings – for data scientists and artificial intelligence professional will continue to grow at a rapid clip in the year ahead. To assist those who seek such a career, this webcast will address the following:

What skills are today’s data science students/professional most eager to learn? How does this match with market needs?

What are some potential career paths for students/professionals who are developing their data science and AI skills?

How can job candidates better prepare for interviews for positions as data scientists?

Why is it important to get business and computer science students collaborating on machine learning algorithms?

To provide insight about a career in AI and data science, I’ll spokewith Ted Kwartler, VP of Trusted AI at DataRobot. Kwartler is also a Harvard Adjunct Professor, where he teaches the “Data Mining for Business Course.”



“Absolutely, Harvard said it’s the sexiest Job of the Decade. There’s an absolute shortage of data scientists, we recognize that here, and my students do as well. And you see a lot of institutions trying to fill that need, train people, and people are attracted to it because the salaries are so good, absolutely.

“I have a friend at a major tech firm through an acquisition, he’s making not a million dollars, but definitely 1% of 1% money, absolutely impressive money. What you see for people who are aspiring to it, they’re trying to get on to that career trajectory. And so they have questions about, “How do I get into that and then build a career from it?” You’re not gonna start at those types of salaries, but that’s the promise land, right?”


“You see a lot of students being very excited about the model building itself, and particularly they wanna use deep neural networks, which is used for image recognition for instance.

“So they get a lot of heavy math, lots of programming, very heavy into a model building, and that’s the exciting part, that’s how I actually got into it…I was trying to gamble on basketball, to be honest with you, and building a model and spending time doing that. And what was interesting was, when you get into industry that’s not always necessary, you can have a good enough model.

“What I say is, not necessarily big data, a ‘big enough’ data. And what I mean by there’s a disconnect is related to what’s actually driving value. So a data scientist fresh out of academia, or fresh with their certification, they may wanna spend six months building the perfect model and optimizing out to the 6th decimal point, right?

“But if I’m really just trying to do a customer propensity model to offer someone in my call center who calls into a call center some new offer, the business itself doesn’t need that. And so, there’s a disconnect between what is needed practically, and what is getting people excited which is the model building of it.

“When I was at Liberty Mutual, I sat on a Machine Learning Research Team, and it would be very typical that you would spend, let’s say, three to six months getting your data, organizing your data. Another three to six months optimizing your model, then another three months working with IT to get it across the finish line. And so, it’s very troublesome. A lot of the data scientists don’t even like doing the data part, they don’t wanna go and learn about the business and understand the use case.”


“It’s an interesting space because by now many people have seen that Venn diagram, and there’s a unicorn and it’s sitting in the middle, and that’s your data scientist.

“I myself have an MBA, and completely self-taught on it. What we talk about at DataRobot is business analysts that are capable and motivated, they become Citizen Data Scientists, we want to arm them to become data scientists. That can be done through training, that can be done through software. What’s interesting about that career path in particular is, you have time to learn the business, understand the narrative behind putting a model into place, because you’ve started let’s say at that junior-level.

“Another kind of differing career path would be like a heavy mathematician, so this is someone with PhD astrophysics, something like that. They can absolutely make excellent models, the challenge for them is how do they scale in the business side, right?

“Another one would be a software engineer who wants to learn modeling. There’s a growing need for what we call machine-learning engineers, people that can take the code and already know the computer science enough to get it across the finish line, get it into production.

“So those are kind of three that I think are very important career paths, so you have varying ways to get there. And then obviously maybe I’m biased, I’m likely biased, because I have an MBA I think there’s a real need to be data fluent managers, people who…understand how to work with these technical individuals.”

“And you sit down with executives, you start talking about data fluency and you talk about the geospatial data that these cars are giving off, and they connect through APIs, and they’re using deep neural net image recognition. And the executive looks at you and says, ‘What’s an API?’ Then it’s like, ‘Oh! We have to back way up here, right?’ When we can’t even get to the strategy we need fundamental understandings of some of the technology. And so I think there’s definitely an opportunity for managers to up-scale and ensure that their business…

“Let’s think about it this way, if you have 10 data scientists and you’re paying them $100,000 as burden cost, you’re out a million dollars, you wanna ensure that they’re generating value for the business.


“So I think I would say, first and foremost, think about what stage you’re at. Think about what the audience is looking for. That is just an example of the recruiter.

“The next stage that I have observed, is very often you have a series of interviews with people who are doing the job. These types of people are gonna be the ones that want the technical depth.

“It’s a balancing act, because they want to know that you can do the job. That you can bring something to the table that they can learn from. But generally, because people in this profession candidly are fairly arrogant sometimes, you also don’t want to outshine them, right?

“Here at DataRobot I would say data science is a team sport. And what I mean by that is you’re constantly interacting, and asking for best practices. This field is so diverse, it’s such a large umbrella, no one is gonna be expected to know every single nuanced way to approach a problem. And so very often you need to interact with people, asking them their best practices technically. Let alone if you’re trying to then get your model into production, right? So you still need these interpersonal communication skills, and to have some qualitative aspects. And so I think that’s very often… Again, going back to the first question where people index on, “I can build the best model possible.”


“You’ll see a lot of different job titles that if you read the descriptions end up being data-heavy, and put you on that path to data science. So cast a very wide net, don’t limit your options. And in terms of a college degree we are at the point where a college degree definitely helps open doors.

“But you see a lot of success coming out of people that have DataCamp certifications or bootcamp certifications, because the demand is there. So…

“What I tell students who are interested in building these careers, find a passion project. Because what happens is, you’ll be motivated at night to come home, and learn how to web scrape basketball statistics, learn how to download stock data, whatever your passion project is.

“You hit a roadblock, you yourself are going to be empowered and motivated to overcome that roadblock. You’ll spend time on the forums, you’ll spend time on Stack Overflow. And so there’s learning that happens just by doing. And so I don’t know that a college degree in itself really is necessary.

“I may get it wrong, but one of the boot camps maybe General Assembly or something like that, actually helps them with a career fair at the conclusion of an eight-week program. Helps open those doors, helps them get the internship. And you think about the cost of education, even at a place like Harvard, right? Obviously, the graduates from an institution with that brand, they get placed, right? So maybe, depending on just getting your foot in the door, these other certifications can help you.”

Top 10 Data Science Companies In India To Work For 2023

A rundown of top data science companies for 2023

Data Science is an umbrella term that covers areas – Data Analytics, Big Data, Business Analytics, Machine Learning, Artificial Intelligence and Deep Learning. This immense field has changed what businesses look like into data and convert them into usable insights. Advancement in technologies and data science tools have changed the manners by which organizations work and grow. India, being a mother lode of ability, is the top destination for national and global companies searching for qualified Data Science experts. Over recent years, the demand for Data Scientists has developed exponentially. More than 97,000 data science jobs are open in 2023 just in India. Let’s look at some of the top data science companies that you can consider to land your next job.  

1.  Ugam, a Merkle company

Ugam, a Merkle company and part of Dentsu, is a leading next-generation data and analytics company helping businesses make superior decisions. Ugam’s customer-centric approach blends data, technology, and expertise, enabling impactful and long-tenured relationships with more than 85 Fortune 500 companies. Recognized as one of the best firms for data scientists to work, Ugam’s data scientists get an opportunity to work directly with client business stakeholders on end-to-end projects. Leveraging Ugam’s proprietary analytical tools, frameworks, and AI / ML technology (Ugam’s JARVIS), they deliver superior results across industries like Retail, Hi-Tech, BFSI, Distribution and Manufacturing as well as Market Research and Consulting. Ugam not only offers data scientists an opportunity to accelerate their career but also offers stability and a unique culture. Led by its founding partners and a committed leadership team, it has experienced significant Y-O-Y growth since inception. The company has a high percentage of long tenured (more than 10 years) and boomerang data scientists. Ugamites vouch for Ugam’s people-centric culture, upskilling, and mobility (across geographies or teams) opportunities and positively driven work environment, thereby making it Analytics Insight’s top pick for data scientists to work.  

2.  MuSigma

Recognizing itself as the biggest solution provider of decision science and analytics, MuSigma has its headquarters in Chicago, US. It has workplaces world-over, with Bangalore as its central delivery hub. Your role as a Data Scientist at MuSigma would include analysing data, refining as well as rearranging it and lastly assessing the outcomes. Mu Sigma is one of the favorite places for employees to work in the field of data science because of its open culture. It’s quite well-known as it serves Fortune 500 organizations through decision science and big data analytics. Mu Sigma has a creative and interactive way to invite its new employees through what they call MSU (Mu Sigma University), where the new employees get hands-on training on various challenging projects under the direction of senior experts in the organization.  

3.  Manthan

Another leading data science firm is Manthan! They have an extraordinary methodology with regards to business solutions. They collaborate the power of AI and analytics that gives data-driven insights of a business model. They assist organizations with making educated decisions by means of rigid data analysis and technology. This organization serves various businesses from technology to telecom, just as retail, pharma, and travel. Its data scientists give an analytics model for the decision-making of its customers. At Manthan, data scientists are constantly encouraged to test performance of different data-driven products using leading technologies like AI, ML, etc. that are relative to their domain. They are given the opportunity to manage large amounts of data to find valuable insights that streamline business procedures, identify opportunities using research and management tools, and reduce risks.  

4.  Absolutdata

Absolutdata bestows impressive learning and growth curves than different players in the market. With explicit, role-based learning on niche subjects, data scientists can upskill and concentrate on fortifying core fundamentals. Moreover, they are urged to take up new jobs and responsibilities that draw out the best in them while permitting them to grow into influential positions.  

5.  Fractal Analytics

Founded in 2000, Fractal Analytics has developed as one of the top analytics service providers in the nation. With a worldwide impression bragging about a few Fortune 500 organizations from ventures like retail, insurance and technology, there is unquestionably no halting this one. The organization is at present employing Data Scientists for its workplaces in Bangalore, Mumbai and Gurgaon. Fractal Analytics has built-up a good customer base. Hence, as a data scientist you’ll be working on significant projects such as business analytics, healthcare, and decision-making. With the pool of data scientists working at Fractal increasing, they’ve started providing training and mentorship programs that will enable its employees to enhance their skills. You’ll primarily work on forecasting projects. If data analytics and forecasting is what you wish to do, Fractal Analytics is your place then.  

6.  BRIDGEi2i Analytics

Established in India in May 2011 by Prithvijit Roy (CEO), Pritam K Paul (CTO) and Ashish Sharma (COO) , their asset-based consulting approach covers the entire range, directly from data science to machine learning-centered knowledge improvement to actionability by way of AI accelerators implementation and finally contextualization of the goal to the companies. The company has an attrition rate of 10-12% and believes in sustaining its talent pool with constant, experiential-based learning. It offers its employees chances to progress rapidly into leadership roles. The company has a strong recognition system that guarantees that all the contributions of employees are valued and appropriately awarded.  

7.  Latent View

Latent View furnishes customers with a range of data science services like counseling, Data Architecture and Design, and data implementation and operations. They are upheld by scalable modern architecture. The work culture is friendly and development-oriented. They encourage workers to see each viewpoint in three edges: team, customer, and society. Having Paypal, IBM, Microsoft, and Cisco as the organization’s esteemed customers, it urges data scientists to have a 360-perspective on each project to permit customers to streamline decisions on investment and anticipate the most recent revenue streams as well as to predict product trends. The most compelling motivation they provide and hold individuals is a mix of learning and working with an excellent peer group in addition to a chance to take care of complex business issues with acing analytics abilities in a climate that makes the whole journey rewarding.  

8.  Accenture

Accenture emphasizes that enormous and complex organizations can profit by efficient utilization of their own data. They have to depend on the experts for it – data scientists. If you are passionate about characterizing procedures and delivering on them with the assistance of creative utilization of integrated data then Accenture is the company to be. The unmistakable worldwide professional service provider has openings for data scientists in the field of business process specialization and data management to give some examples. At Accenture, data scientists will also be exposed on the strategy side as well. They’ll be responsible to define strategies and provide solutions using vast amounts of data.  

9.  Genpact

Genpact has more than 1500 data scientists who work as a centralised hub model with customer experience as its main concern. The organization centers around developing the pool of citizen data scientists through different projects, for example, Machine Learning Incubator’ and ‘ML Upgrade’. ML Incubator program is an in-house AI/ML college which aims to upskill more than 600 existing domain experts every year by giving them structured and instructor paced learning structure, in the fields of data engineering, data science.  

10. Tiger Analytics

Tiger Analytics is spearheading what AI and analytics can do to take care of the absolute hardest issues encountered by companies worldwide. They create bespoke solutions fueled by data and technology for a few Fortune 500 organizations. They have workplaces in various urban communities across the US, India, and Singapore, and a substantial remote global workforce.

Update the detailed information about Python Generators And Iterators In 2 Minutes For Data Science Beginners on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!