Manthan Ghasadiya

Manthan Ghasadiya

28 Articles Published

Articles by Manthan Ghasadiya

Page 3 of 3

How to create Abstract Model Class in Django?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 3K+ Views

We will learn about how to create Abstract Model Class in Django. An abstract model class in Django is a model that serves as a template for other models to inherit from rather than being directly created or saved to the database. Abstract models allow you to define common fields and behaviors shared across multiple models in your application. In Django, you create an abstract model by defining a class that inherits from django.db.models.Model and setting abstract = True in its Meta class. When a model inherits from an abstract model, it gains all the fields and methods ...

Read More

How to create Ternary Overlay using Plotly?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 506 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 Plotly. To create a Ternary Overlay using Plotly, we use the scatterternary trace type. This trace type creates a scatter plot on a ternary diagram, where the components A, B, and C represent the vertices of an equilateral triangle. The position of each point within the triangle represents the proportion ...

Read More

How to create a seaborn correlation heatmap in Python?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 9K+ Views

A correlation heatmap is a graphical representation that displays the correlation matrix of a dataset using colors to show the strength and direction of relationships between variables. It's an effective tool for identifying patterns and connections in large datasets. Seaborn, a Python data visualization library, provides simple utilities for creating statistical visualizations including correlation heatmaps. The process involves importing your dataset, computing the correlation matrix, and using Seaborn's heatmap function to generate the visualization. Using the heatmap() Function The heatmap() function generates a color-coded matrix showing correlations between variable pairs. It requires a correlation matrix as input, ...

Read More

How to Create and Customize Venn Diagrams in Python?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 1K+ Views

Venn diagrams are visual representations used to show relationships between different sets of data. Python's matplotlib-venn library provides powerful tools to create and customize these diagrams with ease. The matplotlib-venn library extends matplotlib's functionality specifically for creating Venn diagrams. It supports both 2-set and 3-set diagrams with extensive customization options including colors, labels, and styling. Installation First, install the required library ? pip install matplotlib-venn Basic Two-Set Venn Diagram Here's how to create a simple intersection of two sets ? import matplotlib.pyplot as plt from matplotlib_venn import venn2, venn2_circles ...

Read More

How to create an ogive graph in python?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 713 Views

An ogive graph graphically represents the cumulative distribution function (CDF) of a dataset, also known as a cumulative frequency curve. It helps analyze data distribution and identify patterns and trends. Python provides libraries like Matplotlib, Pandas, and NumPy to create ogive graphs effectively. What is an Ogive Graph? An ogive is a line graph that shows the cumulative frequency of data points up to each value. The curve typically starts at zero and rises to the total frequency, creating an S-shaped curve that reveals distribution characteristics. Syntax # Calculate cumulative frequency freq, bins = np.histogram(data, ...

Read More

How to create BMI calculator web app using Python and PyWebio?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 715 Views

PyWebIO is a Python library that enables you to build web applications with simple user interfaces without requiring HTML and JavaScript knowledge. This tutorial demonstrates how to create a BMI (Body Mass Index) calculator web app using two different approaches. BMI measures body fat based on weight and height, commonly used to determine if a person is underweight, normal weight, overweight, or obese. Method 1: Object-Oriented Approach This method uses a class-based structure to organize the BMI calculation logic ? from pywebio.input import input, FLOAT from pywebio.output import put_text class BMICalculator: ...

Read More

How to Create a Sequence of Linearly Increasing Values with NumPy Arrange?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 670 Views

NumPy is a Python library widely used for numerical computations and scientific data analysis. One of the most commonly used functions is numpy.arange(), which creates a sequence of linearly increasing values with a given start, stop, and step size. This tutorial examines how to use numpy.arange() to produce sequences of linearly increasing values. Syntax numpy.arange([start, ]stop, [step, ], dtype=None) Parameters start − Starting value of the sequence (optional, default is 0) stop − End value of the sequence (not included) step − Spacing between values (optional, default is 1) dtype − Data type of ...

Read More

How to create an empty PySpark dataframe?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 10-Apr-2023 15K+ Views

PySpark is a data processing framework built on top of Apache Spark, which is widely used for large-scale data processing tasks. It provides an efficient way to work with big data; it has data processing capabilities. A PySpark dataFrame is a distributed collection of data organized into named columns. It is similar to a table in a relational database, with columns representing the features and rows representing the observations. A dataFrame can be created from various data sources, such as CSV, JSON, Parquet files, and existing RDDs (Resilient Distributed Datasets). However, sometimes it may be required to create an ...

Read More
Showing 21–28 of 28 articles
« Prev 1 2 3 Next »
Advertisements