Found 10476 Articles for Python

Pie chart in pygal

Priya Mishra
Updated on 24-Jul-2023 21:10:57

582 Views

The Pygal library provides a powerful and intuitive way to create visually appealing pie charts in Python. Pie charts are a popular choice for displaying data distribution, and Pygal makes it easy to generate interactive SVG charts with customizable settings. With Pygal's user-friendly interface, we can easily define data, customize colors, titles, labels, legends, and more. Whether we're visualizing sales figures, survey results, or any other categorical data, Pygal's pie charts offer an effective and visually appealing solution. This article explores the creation of pie charts using Pygal, showcasing its versatility and flexibility in presenting data insights. How to ... Read More

Perform addition and subtraction using CherryPy

Priya Mishra
Updated on 24-Jul-2023 21:06:50

202 Views

CherryPy, a versatile Python web framework, offers a convenient and efficient way to perform addition and subtraction operations. In this article, we delve into the process of utilizing CherryPy to carry out basic arithmetic calculations within a web application. By leveraging CherryPy's lightweight and intuitive features, developers can effortlessly implement addition and subtraction functionalities, making mathematical operations seamless and easily accessible to users. How to perform addition and subtraction using CherryPy? Below are the steps that we will follow to perform addition and subtraction using CherryPy − We import the CherryPy module, which allows us to create a web ... Read More

Pause method - Action Chains in Selenium Python

Priya Mishra
Updated on 24-Jul-2023 21:00:54

1K+ Views

The Pause method is an essential technique utilized in Selenium Python for implementing Action Chains. Action Chains allow users to perform complex interactions on web pages, such as hovering over elements, clicking and dragging, and more. By incorporating the Pause method, programmers can introduce specific time delays between actions, ensuring accurate execution and synchronization. This article explores the significance of the Pause method and how it enhances the functionality and reliability of Action Chains in Selenium Python. What are Action chains? Action Chains, in Selenium Python, allow users to perform a series of actions sequentially, mimicking real user interactions. ... Read More

Parkinson Disease Prediction using Machine Learning in Python

Priya Mishra
Updated on 24-Jul-2023 20:58:50

700 Views

Parkinson's Disease is a neurodegenerative disorder that affects millions worldwide, early and accurate diagnosis is crucial for effective treatment which can easily be done using machine learning in Python. This article explores the application of machine learning techniques in predicting Parkinson's Disease using a dataset from the UCI machine learning repository. By employing the Random Forest Classifier algorithm, we demonstrate how Python can be leveraged to analyze and preprocess data, train a predictive model, and make accurate predictions. Parkinson Disease Prediction using Machine Learning in Python We have used Jupyter notebook to run the code in this article. Below ... Read More

Parent element method in Selenium Python

Priya Mishra
Updated on 24-Jul-2023 20:54:46

2K+ Views

Selenium is a robust tool that enables the automation of web browsers, and Python is widely employed for test automation, a significant aspect of Selenium is its capability to find elements on web pages through diverse approaches which can easily be done using the parent element method that emerges as a valuable technique. By recognizing and manipulating the parent element associated with a particular target element, testers can effectively engage with specific sections of a webpage. This article delves into the parent element method in Selenium Python, shedding light on its benefits and practical implementation strategies. What is a ... Read More

How to take a random row from a PySpark DataFrame?

Priya Mishra
Updated on 24-Jul-2023 20:41:54

5K+ Views

In PySpark, working with large datasets often requires extracting a random row from a DataFrame for various purposes such as sampling or testing. However, the process of selecting a random row can be challenging due to the distributed nature of Spark. In this article, we explore efficient techniques to tackle this task, discussing different approaches and providing code examples to help you effortlessly extract a random row from a PySpark DataFrame. How to take a random row from a PySpark DataFrame? Below are the Approaches or the methods using which we can take a random row from a PySpark ... Read More

Plotting Geospatial Data using GeoPandas

Shriansh Kumar
Updated on 21-Jul-2023 19:07:58

456 Views

GeoPandas, a widely used Python library build on top of the Pandas library to include the support of geospatial data. Here, geospatial data or geodata describes the information related to the various locations on Earth's surface. These datasets have many use cases including visualization of maps, urban planning, analysis of trade locations, network planning and so forth. In this article, we are going to explore how the GeoPandas library works and also, how to plot geospatial data using GeoPandas. Plotting Geospatial data using GeoPandas in Python Since GeoPandas extends the features of the Pandas library, we need to ... Read More

Parallelizing a Numpy Vector Operation

Shriansh Kumar
Updated on 21-Jul-2023 19:17:50

443 Views

Numpy is a powerful Python library that serves to store and manipulate large, multi-dimensional arrays. Although it is fast and more efficient than other similar collections like lists, we can further enhance its performance by using the parallelizing mechanism. Parallelizing means splitting the tasks into multiple processes to achieve one single goal. Python provides several ways to parallelize a numpy vector operation including multiprocessing and numexpr module. Python Programs for Parallelizing a NumPy Vector Operation Let's discuss the ways to parallelize a numpy vector: Using multiprocessing Every Python program is considered as one single process and ... Read More

Plotting A Square Wave Using Matplotlib, Numpy And Scipy

Shriansh Kumar
Updated on 21-Jul-2023 18:45:53

2K+ Views

A square wave is a type of non-sinusoidal waveform that is widely used in electric and digital circuits to show signals. Basically, these circuits use a square wave to represent input and output or on and off. Python provides several ways to plot square waves including Matplotlib, NumPy and Scipy libraries. These libraries offer various built-in methods for data visualization, making it easy to create and customize square wave plots. Python Program for plotting a Square Wave Before discussing the example programs, it is necessary to familiarize ourselves with the basics of Matplotlib, NumPy and Scipy libraries. ... Read More

Plot Line Graph from NumPy Array

Shriansh Kumar
Updated on 25-Jul-2023 10:43:34

4K+ Views

A line graph is a common way to display the relationship between two dependent datasets. Its general purpose is to show change over time. To plot a line graph from the numpy array, we can use matplotlib which is the oldest and most widely used Python library for plotting. Also, it can be easily integrated with numpy which makes it easy to create line graphs to represent trends and patterns in the given datasets. Python Program to Plot line graph from NumPy array Here are the example programs that demonstrate how to plot line graphs from numpy ... Read More

Advertisements