
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

9K+ Views
Numpy is a powerful Python library that serves to handle large, multi-dimensional arrays. However, when printing large numpy arrays, the interpreter often truncates the output to save space and shows only a few elements of that array. In this article, we will show how to print a full Numpy array without truncation. To understand the problem statement properly, consider the below example: Input aray = np.arange(1100) Output [ 0 1 2 ... 1097 1098 1099] In the above example, we have created an array with 1100 elements. When ... Read More

1K+ Views
Pandas is a powerful Python library mainly used for data analysis. Since it contains large and complicated numeric datasets that are difficult to understand, we need to plot these datasets which makes it easy to visualize relationships within the given dataset. Python provides several libraries such as Matplotlib, Plotly and Seaborn to create informative plots from the given data with ease. In this article, we will show how to plot the size of each group in a Groupby object in Pandas. Python Program to Plot the Size of each Group in a Groupby Object To plot the ... Read More

2K+ Views
Finding the percentile rank is a common operation that is used for comparison between data of a single dataset. The end result of this operation shows a certain percentage is greater than or equal to the specified percentile. For instance, suppose a student obtains a score greater than or equal to 80% of all other scores. Then, the percentile rank of that student is 80th. To find the percentile rank of a column in a Pandas DataFrame, we can use the built-in methods named 'rank()' and 'percentile()' provided by Python. Python Program to find Percentile Rank of ... Read More

564 Views
While presenting or explaining some facts and figures using Pandas DataFrame, we might need to highlight important rows and columns of the given data that help in making them more appealing, easier to understand and visually stunning. One way of highlighting the Pandas DataFrame's specific columns is by using the built-in method applymap(). Python Program to Highlight Pandas DataFrame using applymap() To understand the code properly, we need to discuss the basics of Pandas and applymap(): Pandas It is an open-source Python library that is mainly used for data analysis and manipulation. It can handle ... Read More

2K+ Views
While presenting or explaining some facts using Pandas DataFrame, we might need to highlight important rows and columns of the given data that help in making them more appealing, explainable and visually stunning. One way of highlighting the Pandas DataFrame's specific columns is by using the built-in method apply(). Python Program to Highlight Pandas DataFrame using apply() Before jumping to the example program directly, it is necessary to discuss the basics of Pandas and apply(). Pandas It is an open-source Python library that is mainly used for data analysis and manipulation. It can handle both relational ... Read More

3K+ Views
Hierarchical data is often used to represent multiple levels of nested groups or categories. For example, a company may have a hierarchy of employees, departments, and locations. A product may have a hierarchy of categories and subcategories. One of the challenges of working with hierarchical data is how to represent it in a tabular format which can make it easy to manipulate and analyze. In this article, we are going to present hierarchical data using Pandas' built-in methods like 'set_index()' and 'groupby()'. Python Program to Represent Hierarchical Data using Pandas First, let's briefly discuss Pandas and its ... Read More

8K+ Views
Python provides a powerful library named Matplotlib that creates visual representations in the form of plots and graphs. One of the many features of this library is the ability to plot multiple lines in a single graph that are useful in comparing data sets or visualizing trends over time. We are going to explore the built-in method named 'plot()' that is used for plotting multiple lines in Python Matplotlib. Python Program to Plot Multiple lines in Matplotlib Before jumping to the program directly, let's familiarize ourselves with some basic concepts of Python that will help us ... Read More

3K+ Views
Python provides a powerful library named Matplotlib that creates visual representations in the form of plots and graphs. One of the many features of this library is the ability to plot multiple plots within a single figure that are useful when comparing different datasets or visualizing relationships between multiple variables. We are going to explore the built-in method named 'subplots()' of Matplotlib that is used to plot multiple plots. Python program to plot multiple plots in Matplotlib Before jumping to the program directly let's familiarize ourselves with subplots() method of Matplotlib. subplots() method With a single ... Read More

9K+ Views
Python provides a powerful library named Matplotlib that creates visual representations in the form of plots and graphs. One of the many features of this library is the ability to plot vertical lines that are used to add a reference line or highlight a specific point on the given plot. The built-in methods 'axvline()', 'vlines()', and 'plot()' of Matplotlib are used to plot vertical lines with customizable parameters such as position, color, and linestyle. We are going to explain these methods with the help of example programs. Plotting vertical line using Matplotlib Let's discuss the in-built methods of ... Read More

443 Views
In machine learning, data comes in different types, including numerical, categorical, and text data. Categorical features are features that take on a limited set of values, such as colors, genders, or countries. However, most machine learning algorithms require numerical features as inputs, which means we need to convert categorical features to numerical features before training our models. In this article, we will explore various techniques to convert categorical features to numerical features in Python. We will discuss one-hot encoding, label encoding, binary encoding, count encoding, and target encoding, and provide examples of how to implement these techniques using the ... Read More