Tapas Kumar Ghosh has Published 150 Articles

How to Convert a Matrix to a Dictionary in Python

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 17-Jul-2023 17:47:51

240 Views

The matrix is defined by arranging rows and columns to form an array. The values of a matrix in rows and columns either be characters or integers. There are various method names- dictionary comprehension, for loop, enumerate, and, zip() that will be used to Convert a Matrix to a Dictionary ... Read More

Convert Snake Case String to Camel Case using Python

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 17-Jul-2023 17:43:29

1K+ Views

The snake case string is the naming convention where words are instead separated by an underscore(‘-’). The Camel case is defined by two or more words connected together without spaces and the first letter of each word being capitalized. There are various built-in methods in Python such as split(), join(), ... Read More

Convert Lists to Nested Dictionary in Python

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 17-Jul-2023 17:42:11

365 Views

The list is defined by an ordered sequence of elements whereas the nested dictionary defines the dictionary include another dictionary. The nested dictionary is required when we want to store large data in a big dictionary. In Python, we have some built-in functions like reduce() and zip() that Convert Lists ... Read More

How to Search the Parse Tree using BeautifulSoup?

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 17-Jul-2023 17:30:05

139 Views

Finding the tag and the HTML tree's content indicates searching the parse tree using BeautifulSoup. There are other ways to accomplish this, but the find() and find_all() methods are the most popular for searching the parse tree. We can use BeautifulSoup to parse the HTML tree with the help of ... Read More

How to select a range of rows from a dataframe in PySpark?

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 17-Jul-2023 17:19:48

680 Views

The dataframe in PySpark is defined by a shared collection of data that can be used to run in computer machines and structurize the data into rows and columns format. The range of rows defines a horizontal line(set of multiple values according to condition) in the dataset. In general, the ... Read More

How to set a seaborn chart size?

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 17-Jul-2023 17:16:30

175 Views

Seaborn is a Python data visualization library based on Matplotlib. It provides beautiful default styles and color palettes to make statistical plots more attractive. It is also closely integrated with the data structures from Pandas. Seaborn aims to make visualization the central part of exploring and understanding data. This type ... Read More

How to slice a 3D Tensor in Pytorch?

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 17-Jul-2023 17:12:36

899 Views

The 3D Tensor in Python is known for its array of matrices whereas the 1D and 2D Tensor represents vector and matrix respectively. The Pytorch is defined by an open-source module of machine learning framework based on Python programming and it provides the module named torch. In Python, we have ... Read More

How to skip rows while reading csv file using Pandas

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 17-Jul-2023 17:10:52

2K+ Views

Python has a built-in method read_csv that can be used to set the skip rows while reading csv file using Pandas. The CSV stands for Comma Separated Values and is known as an extension of a file that contains the database. This technique can be used in any application that ... Read More

How to Show Values on Seaborn Barplot?

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 17-Jul-2023 17:07:37

3K+ Views

In Seaborn's barplot, the average value of a numerical variable is displayed, while error bars indicate the range of possible values surrounding the average. When comparing values to 0, it is helpful. In Python, we have some built-in functions like barplot(), enumerate(), and, text() that can be used to Show ... Read More

Python Program to display date in different country format

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 17-Jul-2023 17:05:54

409 Views

In Python, we have some time in-built functions like datetime.now(), utcnow(), astimezone(), and strftime() that can be used to display time in the different country formats. In this program, we will use the modules namely datetime(to access all content related to date and time) and pytz(allows for timezone calculation and ... Read More

Previous 1 ... 5 6 7 8 9 ... 15 Next
Advertisements