Found 10784 Articles for Python

How to Create an App in Django?

Manthan Ghasadiya
Updated on 11-May-2023 15:20:14

887 Views

Django is a Python web framework. Developers can use Django to develop web applications rapidly, and the Django framework contains multiple libraries and tools to improve the web development experience. The Django project contains various features, such as automatic admin interface integration, built-in form handling, URL and user request handling, etc., and one of them is Django App. In the Django project, the app is a module that contains templates, URLs, models, views, etc. So, the app is a module in large projects which we can resuse in other projects. Furthermore, the app makes it easy to manage the code ... Read More

How to Create banner in kivymd-Python?

Manthan Ghasadiya
Updated on 11-May-2023 15:18:48

498 Views

In KivyMD-Python, a banner is a graphical element that displays a short message or notification to the user. It can be used to inform the user about the status of the application, such as the successful completion of a task or an error that occurred. Banners can be customized in colour, text, and position on the screen. They are particularly useful for mobile applications where space is limited and quick feedback to the user is important. Banners can improve the overall user experience by providing timely and relevant information. Types of Banners In KivyMD-Python, there are two types of banners ... Read More

How to create an instance of a Metaclass that run on both Python2 and Python3?

Manthan Ghasadiya
Updated on 11-May-2023 15:15:24

164 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

How to create an empty Figure with Matplotlib in Python?

Manthan Ghasadiya
Updated on 11-May-2023 15:07:30

1K+ 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

How to create an empty and a full NumPy array?

Manthan Ghasadiya
Updated on 11-May-2023 15:06:22

758 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

How to create a text input box with Pygame?

Manthan Ghasadiya
Updated on 11-May-2023 15:04:58

1K+ 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

How to create an empty DataFrame and append rows & columns to it in Pandas?

Manthan Ghasadiya
Updated on 11-May-2023 14:44:53

3K+ 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

How to create AGE Calculator Web App PyWebIO in Python?

Manthan Ghasadiya
Updated on 11-May-2023 14:39:25

269 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

How to create Abstract Model Class in Django?

Manthan Ghasadiya
Updated on 11-May-2023 14:38:02

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

How to create Ternary Overlay using Plotly?

Manthan Ghasadiya
Updated on 11-May-2023 14:35:43

237 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

Advertisements