
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10476 Articles for Python

152 Views
A matrix is a set of numbers arranged in rows and columns format. In python, a matrix can not be created directly. Instead, we can use a nested list or NumPy array as a matrix. The interchanging of first and last row elements of a matrix is demonstrated below. Input Output Scenarios Assume we have a 3X3 matrix represented using a nested list. and output matrix will be the resultant matrix whose first and last row elements are interchanged. Input matrix: [1, 2, 3] [4, 5, 6] [7, 8, 9] Output matrix: [7, 8, 9] [4, 5, ... Read More

2K+ Views
The constants and variables are used to store data values in programming. A variable generally refers to a value that can change over time. Whereas, a constant is a type of variable whose value cannot be changed during a program’s execution. There are only six built-in constants available in Python which are False, True, None, Not Implemented, Ellipsis( ...), and __debug__. Other than these constants, python does not have any built-in data type to store the constant values. Example A sample example of a constant is demonstrated below − False = 100 Output SyntaxError: cannot assign to False ... Read More

6K+ Views
In this tutorial, we will learn how to display notnull rows and columns in a Python dataframe with the help of some libraries. We will be using the Pandas library in this tutorial. A dataframe is a data structure in pandas similar to an Excel sheet or a SQL table. It is a two-dimensional labeled data structure that can hold multiple columns of potentially different types of data such as integer, float, string, etc. Pandas provides a powerful data structure, "dataframe" and other useful methods to work on huge data. Approach 1 One way to display the non-null rows and ... Read More

9K+ Views
In this tutorial, we will learn how to display the most frequent value in a Pandas series with the help of Python. We will be using the Pandas library in this tutorial. A series is a data structure in pandas that is similar to a column in an Excel sheet or a SQL table. It is a one-dimensional labeled data structure that can hold different data types such as integer, float, string, etc. The most frequent value is the one that appears most often in the series. In mathematical terms, it is the mode of the data. Approach 1 One ... Read More

23K+ Views
In this tutorial, we will learn to delete only one row in csv with python. We will be using the Pandas library. Pandas is an open-source library for data analysis; it is one of the most popular python libraries to investigate the data and insights. It includes several functionalities to perform operations on data sets. It can be combined with other libraries like NumPy to perform specific functions with the data. We will use the drop() method to delete the row from any csv file. In this tutorial, we will illustrate three examples to delete the row from the csv ... Read More

393 Views
In data analysis and visualization, there are many types of plots that are used to convey information in a concise and meaningful manner. One of the popular types of plots is the Violin plot, which is useful for visualizing the distribution of a numeric variable for different categories or groups. The Violin plot is similar to a box plot, but it provides more information about the distribution of the data by displaying a density plot on top of the box plot. In this tutorial, we will learn how to create a Violin plot with data points in Seaborn using our ... Read More

3K+ Views
In this tutorial, we will learn how to delete only empty folders in Python. As you delete files or uninstall programs, empty folders might build up over time, but they can be challenging to locate and manually eliminate. Fortunately, Python offers a quick and effective way to delete empty directories automatically. Now, we'll be discussing how to delete empty folders in Python. Approach We can use the built-in os module to identify and delete empty folders using Python. Here's the basic workflow of how we can achieve this − We can use os.walk() to traverse the file system ... Read More

357 Views
Machine Learning ML is the investigation of PC calculations that learn without being unequivocally modified by people. They accomplish this by ingesting and preparing information, which assists them with recognizing examples and patterns. ML is generally pertinent in healthcare, marketing, medical services, logistics, human resources, energy, protection, e-commerce, manufacturing, art & creativity, finance, transportation, automobile, government & surveillance, insurance, and digital media and entertainment. Huge corporate goliaths like Apple, Google, Microsoft, IBM, and to a greater extent, use ML. In addition to the tech monsters, however little and mid-sized new companies likewise depend on ML. Most tech organizations use AI ... Read More

4K+ Views
Matplotlib is a popular data visualization library in Python known for its flexibility and high-quality visualizations. By following this tutorial, you will learn how to create a legend with a color box on your Matplotlib figure, making your visualizations more informative and visually appealing. Before diving into the code, it is important to understand the different elements of a legend. A legend is a key that labels the elements in our plot with different colors, markers, or lines. By adding a legend, we can understand the data being presented and make it easier for the audience to interpret our visualizations. ... Read More

2K+ Views
This tutorial will explain how to manually add the legend text size and color on a Plotly figure using Python. By the end of this tutorial, you will be able to create interactive graphs and charts with the help of the potent Python data visualization package, Plotly. Plot development must include a legend that aids viewers in comprehending the information. However, not all situations will be accommodated by Plotly's default legend settings. This article will discuss how to manually apply legend colors and font sizes to a Plotly figure in Python. Syntax Plotly's update_layout() method and the legend_font_color and legend_font_size ... Read More