numpy.find() in Python Last Updated : 28 Nov, 2018 Comments Improve Suggest changes Like Article Like Report numpy.core.defchararray.find(arr, substring, start=0, end=None): Finds the lowest index of the sub-string in the specified range. Parameters: arr : array-like or string to be searched. substring : substring to search for. start, end : [int, optional] Range to search in. Returns : An integer array with the lowest index of found sub-string. Code #1: Python3 1== # Python Program illustrating # numpy.char.find() method import numpy as np arr = ['vdsdsttetteteAAAa', 'AAAAAAAaattttds', 'AAaaxxxxtt', 'AAaaXDSDdscz'] print ("arr : ", arr) print ("\nfind of 'tt'", np.char.find(arr, 'tt')) print ("find of 'tt'", np.char.find(arr, 'tt', start = 0)) print ("find of 'tt'", np.char.find(arr, 'tt', start = 8)) Output: arr : ['vdsdsttetteteAAAa', 'AAAAAAAaattttds', 'AAaaxxxxtt', 'AAaaXDSDdscz'] find of 'tt' [ 5 9 8 -1] find of 'tt' [ 5 9 8 -1] find of 'tt' [ 8 9 8 -1] Code #2: Python3 1== # Python Program illustrating # numpy.char.find() method import numpy as np arr = ['vdsdsttetteteAAAa', 'AAAAAAAaattttds', 'AAaaxxxxtt', 'AAaaXDSDdscz'] print ("\nfind of 'Aa'", np.char.find(arr, 'Aa')) print ("find of 'Aa'", np.char.find(arr, 'Aa', start = 8)) Output: find of 'Aa' [15 6 1 1] find of 'Aa' [15 -1 -1 -1] Comment More infoAdvertise with us Next Article numpy.find() in Python mohit gupta_omg :) Follow Improve Article Tags : Python Python-numpy Python numpy-String Operation Practice Tags : python Similar Reads numpy.index() in Python numpy.core.defchararray.index(arr, substring, start=0, end=None): Finds the lowest index of the sub-string in the specified range But if substring is not found, it raises ValueError. Parameters: arr : array-like or string to be searched. substring : substring to search for. start, end : [int, option 1 min read numpy.where() in Python We will explore the basics of numpy.where(), how it works, and practical use cases to illustrate its importance in data manipulation and analysis.Syntax of numpy.where()Syntax :numpy.where(condition[, x, y]) Parameters condition: A condition that tests elements of the array.x (optional): Values from 3 min read numpy.argwhere() in Python numpy.argwhere() function is used to find the indices of array elements that are non-zero, grouped by element. Syntax : numpy.argwhere(arr) Parameters : arr : [array_like] Input array. Return : [ndarray] Indices of elements that are non-zero. Indices are grouped by element. Code #1 : Python3 # Pytho 1 min read Python | Numpy ndarray.item() With the help of numpy.ndarray.item() method, we can fetch the data elements that is found at the given index on numpy array. Remember we can give index as one dimensional parameter or can be two dimensional. Parameters: *args : Arguments (variable number and type) -> none: This argument only works 2 min read re.findall() in Python re.findall() method in Python helps us find all pattern occurrences in a string. It's like searching through a sentence to find every word that matches a specific rule. We can do this using regular expressions (regex) to create the pattern and then use re.findall() to get a list of matches.Let's say 2 min read re.finditer() in Python re.finditer() method in Python is used to search for all matches of a pattern in a string and return them as an iterator. In this article, we will explore about re.finditer() method in Python.Let's understand this with the help of an example:Pythonimport re text = "GFG, O, B, GFG, O" pattern = "GFG" 2 min read Python MongoDB - Find MongoDB is a cross-platform document-oriented database program and the most popular NoSQL database program. The term NoSQL means non-relational. MongoDB stores the data in the form of key-value pairs. It is an Open Source, Document Database which provides high performance and scalability along with 3 min read Matplotlib.pyplot.findobj() in Python Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. matplotlib.pyplot.findobj() This function is used to recursively find all instances of a 2 min read Python | numpy.lookfor() method With the help of numpy.lookfor() method, we can get the information about the module in the numpy by using numpy.lookfor() method. Syntax : numpy.lookfor(module_name) Return : Return the information about the module. Example #1 : In this example we can see that by using numpy.lookfor() method, we ar 1 min read Inspect Module in Python The inspect module in Python is useful for examining objects in your code. Since Python is an object-oriented language, this module helps inspect modules, functions and other objects to better understand their structure. It also allows for detailed analysis of function calls and tracebacks, making d 4 min read Like