We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Tag: find

Python : Check if a process is running by name and find it’s Process ID (PID)

In this article we will discuss a cross platform way to find a running process PIDs by name using psutil. To install python’s psutil library use, Advertisements pip install psutil Check if a process is running To check if process is running or not, let’s iterate over all the running process using psutil.process_iter() and match …

Python : Check if a process is running by name and find it’s Process ID (PID)Read More

Find max value & its index in Numpy Array | numpy.amax()

In this article we will discuss how to get the maximum / largest value in a Numpy array and its indices using numpy.amax(). numpy.amax() Python’s numpy module provides a function to get the maximum value from a Numpy array i.e. Advertisements numpy.amax(a, axis=None, out=None, keepdims=<no value>, initial=<no value>) Arguments : a : numpy array from …

Find max value & its index in Numpy Array | numpy.amax()Read More

Python : Find unique values in a numpy array with frequency & indices | numpy.unique()

In this article we will discuss how to find unique values / rows / columns in a 1D & 2D Numpy array. Also how to find their index position & frequency count using numpy.unique(). numpy.unique() Python’s numpy module provides a function to find the unique elements in a numpy array i.e. Advertisements numpy.unique(ar, return_index=False, return_inverse=False, return_counts=False, …

Python : Find unique values in a numpy array with frequency & indices | numpy.unique()Read More

Pandas : Find duplicate rows based on all or few columns

In this article we will discuss ways to find and select duplicate rows in a Dataframe based on all or given column names only. DataFrame.duplicated() In Python’s Pandas library, Dataframe class provides a member function to find duplicate rows based on all columns or some specific columns i.e. Advertisements DataFrame.duplicated(subset=None, keep=’first’) It returns a Boolean …

Pandas : Find duplicate rows based on all or few columnsRead More

numpy.amin() | Find minimum value in Numpy Array and it’s index

In this article we will discuss how to find the minimum or smallest value in a Numpy array and it’s indices using numpy.amin(). numpy.amin() Python’s numpy module provides a function to get the minimum value from a Numpy array i.e. Advertisements numpy.amin(a, axis=None, out=None, keepdims=<no value>, initial=<no value>) Arguments : a : numpy array from …

numpy.amin() | Find minimum value in Numpy Array and it’s indexRead More

Pandas: Find maximum values & position in columns or rows of a Dataframe

In this article we will discuss how to find maximum value in rows & columns of a Dataframe and also it’s index position. DataFrame.max() Python’s Pandas Library provides a member function in Dataframe to find the maximum value along the axis i.e. Advertisements DataFrame.max(axis=None, skipna=None, level=None, numeric_only=None, **kwargs) Important Arguments: axis : Axis along which …

Pandas: Find maximum values & position in columns or rows of a DataframeRead More

Python : Find occurrence count & all indices of a sub-string in another string | including overlapping sub-strings

In this article we will discuss different ways to count occurrences of a sub-string in another string and also their index positions. Count occurrences of a sub-string in another string using string.count() Python’s String class contains a method to count the non overlapping occurrences of a sub-string in the string object i.e. string.count(s, sub[, start[, …

Python : Find occurrence count & all indices of a sub-string in another string | including overlapping sub-stringsRead More

Python : Check if a String contains a sub string & find it’s index | case insensitive

In this article we will discuss different ways to check if a sub-string exists in another string and if yes then find it’s index. Will also explore ways to check the existence of sub-string in case in-sensitive manner by ignoring case. Check if a String contains another string or character using “in” and “not in” …

Python : Check if a String contains a sub string & find it’s index | case insensitiveRead More

Find frequency of each character in string and their indices | Finding duplicate characters in a string

In this article we will discuss different ways to fetch the frequency or occurrence count of each character in the string and their index positions in the string using collections.Counter() and regex. Get Frequency of each character in string using collections.Counter() collections.counter(iterable-or-mapping) Counter is a dict subclass and collections.Counter() accepts an iterable entity as argument …

Find frequency of each character in string and their indices | Finding duplicate characters in a stringRead More

Cart

Your Cart is Empty

Back To Shop