Articles on Trending Technologies

Technical articles with clear explanations and examples

How to Convert a Python datetime.datetime to Excel Serial Date Number?

Mukul Latiyan
Mukul Latiyan
Updated on 27-Mar-2026 3K+ Views

Excel uses a special format to store dates and times, called serial date numbers. Serial date numbers are a count of days since January 1, 1900, which Excel considers as day 1. Python's datetime module provides powerful tools for working with dates, and we can convert datetime objects to Excel's serial format for interoperability. Understanding Excel Serial Date Numbers In Excel, dates are internally represented as serial numbers where each day has a unique numeric value. January 1, 1900 is represented by 1, January 2, 1900 by 2, and so on. This numeric format allows Excel to perform ...

Read More

How to Convert 1-D Arrays as Columns into a 2-D Array in Python?

Mukul Latiyan
Mukul Latiyan
Updated on 27-Mar-2026 329 Views

Arrays are fundamental data structures in programming, enabling us to store and manipulate collections of values efficiently. In this article, we will explore how to convert 1-D arrays into columns of a 2-D array using Python's NumPy library. Understanding 1-D and 2-D Arrays A 1-D array (one-dimensional array) represents a collection of elements arranged in a single row or column. Each element is accessed using an index indicating its position, such as [1, 2, 3, 4, 5]. A 2-D array (two-dimensional array) organizes elements in rows and columns, forming a grid or table structure where each element ...

Read More

How to Convert 1D Array of Tuples to 2D Numpy Array?

Mukul Latiyan
Mukul Latiyan
Updated on 27-Mar-2026 6K+ Views

When working with data in Python, it is often necessary to transform and manipulate arrays to facilitate analysis and computations. One common scenario is converting a 1D array of tuples into a 2D NumPy array. This conversion allows for easier indexing, slicing, and applying vectorized operations. In this article, we'll explore three methods to convert a 1D array of tuples into a 2D NumPy array, each with its own advantages and use cases. Understanding the Data Structures 1D Array of Tuples A 1D array of tuples refers to a data structure where tuples are arranged sequentially ...

Read More

How to Convert Float to Datetime in Pandas DataFrame?

Mukul Latiyan
Mukul Latiyan
Updated on 27-Mar-2026 5K+ Views

Pandas is a powerful data manipulation library widely used in Python for data analysis and preprocessing tasks. When working with data, it is common to encounter situations where dates and times are represented as floating−point numbers instead of the expected datetime format. In such cases, it becomes essential to convert the float values to datetime objects to perform accurate time−based analysis. This article aims to provide a comprehensive guide on how to convert float values to datetime objects in a Pandas DataFrame. Understanding the Importance of Converting Float to Datetime Datetime objects offer several advantages over float ...

Read More

How to simulate mouse movements using Python?

S Vijay Balaji
S Vijay Balaji
Updated on 27-Mar-2026 8K+ Views

When it comes to automation, be it to setup your computer on start-up or to farm coins on a clicker game, it becomes essential to simulate mouse movements and clicks. And what better way to do this than use Python! For performing this particular task of automating or simulating your mouse movement, we will be using Python's mouse library that has various methods and functionalities to help simulate your mouse on your computer. Installation and Setup First, we need to install the mouse library since it doesn't come pre-packaged with Python ? pip install mouse ...

Read More

How to schedule simple alarms in Python?

S Vijay Balaji
S Vijay Balaji
Updated on 27-Mar-2026 536 Views

Creating a simple alarm clock is one of the basic projects that can help you understand the basics of time manipulation, running system commands, playing audio files and other such essential topics. In this tutorial, we will be learning how to build one using Python's datetime module and pygame for audio playback. Installation and Setup For playing the audio file, we will be using the PyGame module. This module does not come pre-packaged with Python, so we need to install it using pip ? pip install pygame Next, we import the necessary modules and ...

Read More

Creating Snow Effect using the Arcade Module in Python

S Vijay Balaji
S Vijay Balaji
Updated on 27-Mar-2026 394 Views

Creating a snow effect adds visual appeal to games and presentations. The Arcade module provides an easy way to implement particle effects like falling snow using object-oriented programming concepts. Installing the Arcade Module The arcade module is not included with Python by default. Install it using pip ? pip install arcade Creating the Snow Class Each snowflake is represented as an object with position coordinates and a method to reset its position ? import random import math import arcade class Snow: def __init__(self, height, width): ...

Read More

Automate GUI Interactions in Python using the PyAutoGUI Library

S Vijay Balaji
S Vijay Balaji
Updated on 27-Mar-2026 2K+ Views

PyAutoGUI is a powerful Python library for automating graphical user interface interactions. It enables developers to simulate keyboard input, mouse movements, and screen interactions, making it invaluable for testing, data entry, and repetitive GUI tasks across Windows, Linux, and macOS. In this tutorial, we'll explore PyAutoGUI's core features including installation, keyboard control, mouse automation, and image recognition capabilities. By the end, you'll understand how to automate various GUI interactions efficiently. Installation Install PyAutoGUI using pip ? pip install pyautogui Once installed, import the library in your Python script ? import pyautogui ...

Read More

Build a Simple Chatbot in Python using Errbot

S Vijay Balaji
S Vijay Balaji
Updated on 27-Mar-2026 407 Views

Errbot is a powerful Python chatbot framework that allows you to create interactive chatbots for various platforms like Slack, Discord, and Telegram. It enables you to start scripts interactively from chatrooms and provides extensive customization through plugins. Installation and Setup First, create a virtual environment and install Errbot. Note that Errbot requires Python 3.6 or higher ? pip install errbot Creating Your Bot Directory Create a dedicated directory for your chatbot project and initialize Errbot ? mkdir chatbot cd chatbot errbot --init The errbot --init command creates all necessary ...

Read More

How to Convert a Numpy Array to Tensor?

Mukul Latiyan
Mukul Latiyan
Updated on 27-Mar-2026 7K+ Views

NumPy is a popular Python library used for numerical computing and scientific computing, providing a powerful array object for handling large and multi-dimensional arrays. However, when it comes to machine learning, deep learning, and neural networks, PyTorch is a widely used library that provides an efficient and flexible platform for building and training these models. While NumPy arrays and PyTorch tensors are similar in many ways, they have different properties and methods, which makes it necessary to convert a NumPy array to a PyTorch tensor when using PyTorch for machine learning applications. In this article, we will explore two ...

Read More
Showing 1–10 of 61,303 articles
« Prev 1 2 3 4 5 6131 Next »
Advertisements