Suneel Raja

Suneel Raja

9 Articles Published

Articles by Suneel Raja

9 articles

Disease Prediction Using Machine Learning with examples

Suneel Raja
Suneel Raja
Updated on 27-Mar-2026 2K+ Views

Disease prediction is a crucial application of machine learning that can help improve healthcare by enabling early diagnosis and intervention. Machine learning algorithms can analyze patient data to identify patterns and predict the likelihood of a disease or condition. In this article, we will explore how disease prediction using machine learning works with practical examples. Disease Prediction Workflow Disease prediction using machine learning involves the following steps ? Data collection ? The first step is to collect patient data, including medical history, symptoms, and diagnostic test results. This data is then compiled into a dataset. Data ...

Read More

Display the Pandas DataFrame in table style

Suneel Raja
Suneel Raja
Updated on 27-Mar-2026 7K+ Views

Pandas DataFrames can be displayed in various table formats for better visualization and analysis. This article explores different methods to present DataFrame data in a clean, readable table style. Using the print() Function The simplest way to display a Pandas DataFrame in table style is using the print() function. Pandas automatically formats the data into a tabular layout ? import pandas as pd # Create a sample DataFrame data = { 'name': ['John', 'Jane', 'Bob', 'Alice'], 'age': [25, 30, 35, 40], 'gender': ['M', ...

Read More

Display the Pandas DataFrame in Heatmap style

Suneel Raja
Suneel Raja
Updated on 27-Mar-2026 2K+ Views

Pandas is a powerful data analysis library that offers a wide range of functions to work with structured data. One of the most popular ways to represent data is through a heatmap, which allows you to visualize data in a tabular format with colors representing the values. In this article, we will explore how to display a Pandas DataFrame in a heatmap style using the Seaborn library. A heatmap is a graphical representation of data where individual values are represented by colors. It's particularly useful for identifying patterns, correlations, and outliers in datasets at a glance. Installing Required ...

Read More

Display scientific notation as float in Python

Suneel Raja
Suneel Raja
Updated on 27-Mar-2026 15K+ Views

Scientific notation is a standard way of representing very large or very small numbers in the scientific and mathematical fields. However, in some cases, it may be more convenient to display these numbers in traditional decimal format. Python provides several methods to convert and display scientific notation as regular floats. Using the float() Function The simplest way to convert scientific notation to a float is using the float() function. It takes a string representation of scientific notation and returns a floating-point number ? # Converting scientific notation string to float number_in_scientific = "1.234e+6" result = float(number_in_scientific) ...

Read More

Display NumPy array in Fortran order

Suneel Raja
Suneel Raja
Updated on 27-Mar-2026 865 Views

In this article, we will explore how to display a NumPy array in Fortran order. By default, NumPy arrays are stored in row-major order (C-order), but sometimes it's necessary to work with column-major order (Fortran-order), especially in scientific computing applications. C-Order (Row-Major) 1 2 3 4 5 6 Fortran-Order (Column-Major) 1 ...

Read More

Display Images on Terminal using Python

Suneel Raja
Suneel Raja
Updated on 27-Mar-2026 2K+ Views

Displaying images on a terminal window can be a useful and fun feature to add to your Python programs. It can be used to create ASCII art, display diagrams or charts, or simply show images in a terminal-based interface. In this article, we'll explore how to display images on a terminal using Python. First, let's understand the basic concept of displaying images on a terminal. A terminal window is essentially a text-based interface that displays characters on the screen. Therefore, to display an image, we need to convert it into characters that can be displayed on a terminal. ...

Read More

Display all the Sundays of a given year using Pandas in Python

Suneel Raja
Suneel Raja
Updated on 27-Mar-2026 538 Views

Pandas is a powerful Python library for data manipulation and analysis. One of its key features is the ability to handle date and time data effectively. In this article, we will show you how to use Pandas to display all the Sundays of a given year using different approaches. Prerequisites Before we start, make sure you have Pandas installed on your machine. You can install it by running the following command in your terminal ? pip install pandas Method 1: Using day_name() Function The first approach uses the day_name() method to identify Sundays ...

Read More

Display all the dates for a particular month using NumPy

Suneel Raja
Suneel Raja
Updated on 27-Mar-2026 344 Views

NumPy is a powerful library in Python for scientific computing, particularly for dealing with arrays and matrices. One of the lesser-known features of NumPy is its ability to generate arrays of dates. In this article, we will explore how to use NumPy to display all the dates for a particular month. Using numpy.arange() with datetime64 To generate all dates for a particular month, we can use np.arange() with datetime64 objects. Let's create a complete example for April 2023 ─ import numpy as np # Define the month and year month = 4 # April ...

Read More

Article on Dispatch Decorator in Python

Suneel Raja
Suneel Raja
Updated on 27-Mar-2026 2K+ Views

In Python, the @dispatch decorator enables function overloading based on argument types. This powerful feature allows you to define multiple implementations of the same function that are automatically selected at runtime based on the types of arguments passed. Python provides two main approaches for dispatch: functools.singledispatch for single-argument dispatch and the multipledispatch library for multiple-argument dispatch. What is Function Dispatch? Function dispatch is a mechanism that selects the appropriate function implementation based on the types of arguments provided. Instead of writing separate function names for different types, you can use the same function name and let Python ...

Read More
Showing 1–9 of 9 articles
« Prev 1 Next »
Advertisements