
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

8K+ Views
Hotkeys are a convenient way to automate repetitive tasks in Python programs. Hotkeys allow users to perform an action quickly and easily, without having to navigate through menus or use a mouse. In this tutorial, we will discuss how to create a hotkey in Python using the keyboard library. This keyboard library provides a simple and easy-to-use API for registering hotkeys and responding to keyboard events. By creating hotkeys in your Python programs, you can enhance the user experience and improve productivity by allowing users to perform tasks quickly and efficiently. We will cover the approach and two code ... Read More

4K+ Views
Candlestick charts are a popular way to visualize stock market data. They show the opening, closing, high, and low prices of a stock or security for a given time period. A candlestick chart consists of a series of vertical bars or "candlesticks", where each candlestick represents one time period. The top and bottom of each candlestick represent the highest and lowest prices traded during that period, while the body of the candlestick represents the opening and closing prices. In this tutorial, we will explore codes where we will use Matplotlib, a popular data visualization library in Python, to create a ... Read More

10K+ Views
Counting the number of rows in a MySQL table is a common operation when working with databases. In Python, you can use the MySQL Connector module to establish a connection to a MySQL database and execute SQL queries to fetch data from tables. There are different ways to count the number of rows in a MySQL table using Python, and the method you choose will depend on the specific requirements of your project. This article will guide you on how to obtain the count of rows in a particular MySQL table that resides in a database. To begin with, we ... Read More

6K+ Views
Pandas and PySpark are two popular data processing tools in Python. While Pandas is well-suited for working with small to medium-sized datasets on a single machine, PySpark is designed for distributed processing of large datasets across multiple machines. Converting a pandas DataFrame to a PySpark DataFrame can be necessary when you need to scale up your data processing to handle larger datasets. In this guide, we'll explore the process of converting a pandas DataFrame to a PySpark DataFrame using the PySpark library in Python. We'll cover the steps involved in installing and setting up PySpark, converting a pandas DataFrame to ... Read More

1K+ Views
Pandas is a popular Python library for data manipulation and analysis. A common task in working with Pandas is to convert a DataFrame into a JSON (JavaScript Object Notation) format, which is a lightweight data interchange format widely used in web applications. The conversion from pandas DataFrame to JSON can be useful for data sharing, data storage, and data transfer between different programming languages. In this tutorial, we will discuss how to convert a pandas DataFrame to JSON using built-in Pandas functions, explore different options and parameters for the conversion, and provide examples of how to handle specific scenarios. Converting ... Read More

15K+ Views
Markdown is a lightweight markup language that allows you to write formatted text that can be easily read and understood on the web. On the other hand, HTML is a markup language used to structure and display content on the web. Converting HTML text to Markdown can be useful in situations where you want to simplify the content or make it more readable. One way to convert HTML to Markdown is by using the markdownify package in Python. This package provides a simple and efficient way to convert HTML text to Markdown format. To begin the conversion process, you need ... Read More

5K+ Views
In today's world, data is generated at an unprecedented rate, and being able to effectively manage and present it is essential. CSV files are commonly used to store and transfer data between systems, but sometimes it is necessary to convert this data into a more readable format such as PDF. Python, with its vast array of libraries, provides an easy and efficient way to convert CSV files to PDF files. In this article, we will explore the steps involved in converting a CSV file to a PDF file using Python, and provide a sample code that you can use to ... Read More

9K+ Views
CSV (Comma Separated Values) files are commonly used to store and exchange tabular data. However, there may be situations where you need to convert the data in CSV columns to text format, for example, to use it as input for natural language processing tasks. Python provides a variety of tools and libraries that can help with this task. In this tutorial, we will explore different methods for converting CSV columns to text in Python, including using the built-in CSV module, Pandas library, and regular expressions. We will also discuss how to handle different types of data and possible issues that ... Read More

4K+ Views
Categorical data, also known as nominal data, is a type of data that is divided into discrete categories or groups. These categories have no inherent order or numerical value, and they are usually represented by words, labels, or symbols. Categorical data is commonly used to describe characteristics or attributes of objects, people, or events, and it can be found in various fields such as social sciences, marketing, and medical research. In Python, categorical data can be represented using various data structures, such as lists, tuples, dictionaries, and arrays. The most commonly used data structure for categorical data in Python is ... Read More

8K+ Views
This tutorial provides a step-by-step guide on how to convert a NumPy array to a dictionary using Python. In NumPy, an array is essentially a table of elements that are typically numbers and share the same data type. It is indexed by a tuple of positive integers, and the number of dimensions of the array is referred to as its rank. The size of the array along each dimension is defined by a tuple of integers known as the shape of the array. The NumPy array class is known as ndarray, and its elements can be accessed by using square ... Read More