
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

258 Views
Metaclasses are a concept in object-oriented programming where a class is an instance of another class, known as the metaclass. They allow for the customization of class creation and behaviour, enabling the creation of classes with specific attributes and methods. A metaclass is the blueprint of the class itself, just like a class is the blueprint for instances of that class. They can be used to enforce coding standards, create automatic APIs, or perform other advanced tasks that are impossible with standard inheritance. Python supports metaclasses, which create custom classes with unique behaviour. Metaclasses can also add special methods or ... Read More

2K+ Views
Matplotlib is a powerful Python library used for data visualization and creating 2D plots. It provides various tools for creating static, animated, and interactive plots, including line plots, scatter plots, bar plots, histograms, etc. Matplotlib is highly customizable, allowing users to adjust colors, fonts, and other visual elements to create high-quality visualizations. It is widely used in data science, engineering, and scientific research and is considered one of Python's most popular data visualization libraries. Matplotlib is open-source and actively developed, with a large community of users and contributors who provide support and maintain the library. Creating an Empty Figure Using ... Read More

1K+ Views
In this tutorial, we will learn to create an empty and a full NumPy array. NumPy stands for Numerical Python. It is a Python library that performs numerical calculations. It provides a multidimensional array object. NumPy is a popular Python library used for working with arrays. It also has functions for working in the domain of linear algebra, sorting, and matrices and is optimized to work with the latest CPU architectures. NumPy is very fast as it is written in C language, making it more effective for creating arrays. An array represents a collection of items of the same data ... Read More

2K+ Views
Pygame is a free and open-source library for developing multimedia applications like video games using Python. It includes graphics and sound libraries, which are very useful in designing video games. Pygame is built on top of the Simple DirectMedia Layer (SDL) library, which provides low-level access to hardware and input devices. Because Pygame is built on top of SDL, it provides a platform-independent interface for graphics, sound, and input handling. This means that you can write your game or multimedia application once and run it on multiple platforms, including Windows, Mac OS, and Linux. To use pygame, one should have ... Read More

4K+ Views
Pandas is a Python library used for data manipulation and analysis. It is built on top of the numpy library and provides an efficient implementation of a dataframe. A dataframe is a two-dimensional data structure. In a dataframe, data is aligned in rows and columns in a tabular Form. It is similar to a spreadsheet or an SQL table or the data.frame in R. The most commonly used pandas object is DataFrame. Mostly, the data is imported into pandas dataframe from other data sources like csv, excel, SQL, etc. In this tutorial, we will learn to create an empty dataframe ... Read More

365 Views
Those who wish to practice their Python skills and learn how to develop a small web app can quickly and amusingly create an age calculator web app using PyWebIO in Python. Interactive online apps are simple to construct thanks to the Python library PyWebIO. This project's online age calculator uses PyWebIO to determine a user's age based on their birthdate. To calculate dates for this web application, we'll use the datetime package that comes with Python by default. The software requires the user's name and birthdate, which then calculates their age in years using the current date. The output will ... Read More

2K+ Views
We will learn about how to create Abstract Model Class in Django. An abstract model class in Django is a model that is used as a template for other models to inherit from rather than one that is meant to be created or saved to the database. In an application, similar fields and behaviours shared by several models can be defined using abstract models. With Django, you define a model class that derives from Django.db.models to establish an abstract model class. Model and set True for the abstract attribute. The attributes and methods of this abstract class will be inherited ... Read More

384 Views
Ternary plots are a useful way to display compositional data where three variables add up to a constant value. Plotly is a powerful plotting library that can be used to create interactive ternary plots with ease. In this tutorial, we will explore how to create a Ternary Overlay using Plotty. We are going to illustrate two examples to create an overlay using Plotly. By the end, we will learn the use Plotly to create stunning and informative ternary overlays. To create a Ternary Overlay using Plotly, we use the ‘scatterternary’ trace type. This trace type creates a scatter plot on ... Read More

1K+ Views
In this tutorial, we will learn to create a Triangle Correlation Heatmap in seaborn; as the name sounds, Correlation is a measure that shows the extent to which variables are related. Correlation heatmaps are a type of plot that represents the relationships between numerical variables. These plots are used to understand which variables are related to each other and the strength of their relationship. Whereas a heatmap is a two-dimensional graphical representation of data using different colors. Seaborn is a Python library that is used for data visualization. It is useful in making statical graphs. It builds on top of ... Read More

4K+ Views
For using arrays in Python, NumPy is commonly used. Sometimes, the data is stored in a multidimensional or 3D array. If loadtxt() or savetxt() functions are used to save or load the array data, it will require a 2d array. If the 3D array is used, then it will give this error – “ValueError: Expected 1D or 2D array, got 3D array instead”. So, in this Python and Numpy article, using two different examples, code is written to show the process of saving arrays and loading arrays while using savetxt() and loadtxt() functions and working with 3D arrays. In the ... Read More