Tapas Kumar Ghosh

Tapas Kumar Ghosh

185 Articles Published

Articles by Tapas Kumar Ghosh

Page 15 of 19

How to search a value within a Pandas DataFrame row?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 17-Jul-2023 4K+ Views

Pandas DataFrame is a part of the Data Structure that is used to represent the 2D structure in tabular form(rows and columns). In Python, we have some built-in functions like eq(), any(), loc[], and, apply() that can be used to search a value within a Pandas DataFrame row. For example- Searching a value is defined by the availability of any specific data. Syntax The following syntax is used in the examples − DataFrame() This is an in-built function in Python that follows the pandas module and show the 2D rows and column into a single frame. eq() This ...

Read More

How to sort by value in PySpark?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 17-Jul-2023 917 Views

PySpark is distributed data processing engine that will use to write the code for an API. PySpark is the collaboration of Apache Spark and Python. Spark is large-scale data processing platform that provides the capability to process petabyte scale data. In Python, we have PySpark built-in functions like orderBy(), sort(), sortBy(), createDataFrame(), collect(), and asc_nulls_last() that can be used to sort the values. Syntax The following syntax is used in the examples − createDataFrame() This is a built-in function in Python that represents another way to create the DataFrame from the PySpark module. orderBy() This is the built-in ...

Read More

How to Skip every Nth index of Numpy array?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 17-Jul-2023 2K+ Views

In Python, we have some built-in functions like array(), len(), append, and, mod() that can be use to Skip every Nth index of Numpy array. There are many ways for skipping the nth index of a NumPy array. The numpy modulus technique is one option. We can first arrange the array into chunks of evenly spaced intervals using the numpy.arange() method. Then, using the nth index, apply the np.mod() technique to the generated list intervals and compute the modulus of each element. Syntax The following syntax is used in the examples − array() This is an in-built method that ...

Read More

How to Set a Single Main Title for All the Subplots in Matplotlib?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 17-Jul-2023 4K+ Views

The multiple subplots are defined by a collection of different plotting graphs. The Matplotlib is name of the module that provides animated and interactive visualization in Python. In Python, we have some built-in function named suptitle() that can be used to Set a Single Main Title for All the Subplots in Matplotlib. Syntax The following syntax is used in the examples − array() The array method of Python is defined by returning the number of elements with its specific value. suptitle() This is the built-in method in Python that can be used to set the main title of ...

Read More

How to set up Python mode for Processing

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 17-Jul-2023 428 Views

An add-on called Python Mode for Processing makes it possible to use Python in the development environment and programming language for visual arts and design known as Processing. In simple terms, add-on means a software program or script that is added to a program that provides a special feature. The processing mode is defined by selecting a programming language that is used to write code. This processing supports both visual and simple programs. For example- Many researchers use Python Processing to run their code because it gives them a special processing model as compared to other interpreters. System Requirement for ...

Read More

How to set up anaconda path to environment variable?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 17-Jul-2023 8K+ Views

An anaconda is an open-source free path that allows users to write programming in Python language. The anaconda is termed by navigator as it includes various applications of Python such as Spyder, Datalore, JupyterLab, orange, etc. This environment helps us to set the different versions and packages of Python. The Anaconda distribution of Python includes more than 350 libraries for data science. The anaconda is also known as one of all management tools. System Requirement to Install Anaconda Navigator Requirement Details RAM 8GB is good CPU 2 x 64-bit Disk Space Minimum ...

Read More

How to Draw Dynamic Animation in HTML5?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 08-Jun-2023 451 Views

HTML has division and button elements that can be used to draw Dynamic Animation. The ability to generate interactive and visually graphics using web technologies is referred to as dynamic animation in HTML5. HTML5 includes a number of complex tools that enable developers to build dynamic and responsive animations by combining HTML, CSS, and JavaScript. Animations extend from simple state transitions through complex interactive models and games. One of the primary advantages of implementing HTML5 for animation is that it is platform-independent and can run on a wide range of platforms, including desktop and mobile devices. HTML5 thus provides a strong tool ...

Read More

How to draw with mouse in HTML 5 canvas?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 08-Jun-2023 2K+ Views

HTML5 has a division element to create the box to draw with the mouse. Developers can create dynamic, interactive graphics for the web using the strong and adaptable HTML5 canvas technology. Drawing on canvas can be performed with a variety of tools and methods. The users can create free-form shapes and lines by dragging their cursor across the canvas when drawing with a mouse, i.e. a common technique. Simple sketches of all diagrams and illustrations will be produced using this method. Properties Used The following properties are used in the example − width − Define the width of the ...

Read More

Python Program to remove the last specified character from the string

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 01-Jun-2023 1K+ Views

Text data manipulation and processing can benefit from using a Python program that will eliminate the last specified character from a string. This kind of application can be used to modify data by deleting particular characters, validate user input by removing incorrect characters, and clean up the text by removing unwanted characters. In Python, we have some string in-built functions like rstrip() that remove the last specified character from the string. The slicing technique is the easier way to remove the character from the end. Syntax The following syntax is used in the examples − len() The len() ...

Read More

Python Program to trim a string from both sides

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 01-Jun-2023 1K+ Views

Python has inbuild functions like lstrip(), strip(), and rstrip() that can be used to remove the character from both sides. The term trim the string of characters means to remove the character from the given string. For example − Given string is ‘iiiiiiiiiiiBOXERiiiiiiiiii’ and the character ‘i’ from both sides. The final result becomes BOXER. Syntax The following syntax is used in the examples − strip() This is a predefined method used in Python to trim the character from both sides of the string. [1:] [:-1] [1:] − This represents the after-slicing on the left side to ...

Read More
Showing 141–150 of 185 articles
« Prev 1 13 14 15 16 17 19 Next »
Advertisements