Connect WiFi Using Python

Mukul Latiyan
Updated on 03-Aug-2023 18:13:51

8K+ Views

Python is a popular programming language used in a wide range of applications, including network programming. In this article, we will explore how to connect to a WiFi network using Python. Connecting to a WiFi network using Python can be useful in situations where you need to automate the process of joining a network, such as in a headless system or in a situation where manual intervention is not possible. Python provides several libraries that can be used to interact with WiFi networks, and we will explore some of them in this article. We will start by looking at the ... Read More

Convert Datetime to Date in Pandas

Mukul Latiyan
Updated on 03-Aug-2023 18:12:55

3K+ Views

In data analysis and manipulation, dealing with dates and times is a common requirement. The Pandas library in Python provides powerful tools for working with datetime values. In this article, we will explore the process of converting datetime values to date−only format in a Pandas DataFrame. When working with datetime values, it is often necessary to extract specific components, such as the year, month, day, or time, for further analysis or visualisation. However, in some cases, we may only be interested in the date portion of the datetime object, excluding the time information. Converting datetime values to date−only format can ... Read More

Create COVID-19 Data Representation GUI in Python

Mukul Latiyan
Updated on 03-Aug-2023 18:11:13

180 Views

The COVID−19 pandemic has disrupted daily life around the world, with numerous countries implementing lockdowns and other restrictions to control the spread of the virus. As a result, there is a great deal of interest in tracking the spread of the virus, including the number of active cases and confirmed cases. With the help of technology, it is now possible to access this data and visualize it in real−time using graphical user interfaces (GUIs). This tutorial will provide an overview of a Python program that creates a GUI for displaying COVID−19 data. Creating a Tkinter GUI to Show COVID19 Data ... Read More

Write Code Effectively in Python

Mukul Latiyan
Updated on 03-Aug-2023 18:09:39

261 Views

In the modern era of technology, coding has become one of the most popular practices. It is an essential skill that is highly prevalent and considered mandatory in many fields, especially those that involve software development or data analysis. At its core, coding is the process of communicating your mental logic to a computer program, allowing it to execute a specific task. With advancements in programming, it has become increasingly important to write efficient code. This means not only creating code that produces the desired outcome but also optimising it to be as fast and resource−efficient as possible. In addition ... Read More

Create PySpark DataFrame from Multiple Lists

Mukul Latiyan
Updated on 03-Aug-2023 18:07:08

2K+ Views

PySpark is a powerful tool for processing large datasets in a distributed computing environment. One of the fundamental tasks in data analysis is to convert data into a format that can be easily processed and analysed. In PySpark, data is typically stored in a DataFrame, which is a distributed collection of data organised into named columns. In some cases, we may want to create a PySpark DataFrame from multiple lists. This can be useful when we have data in a format that is not easily loaded from a file or database. For example, we may have data stored in Python ... Read More

Create Poisson Probability Mass Function Plot in Python

Mukul Latiyan
Updated on 03-Aug-2023 18:04:33

2K+ Views

The Poisson distribution is a probability distribution that models the occurrence of events in a fixed time or space interval, given the average rate of occurrence. It is commonly used in fields such as physics, engineering, and economics to model the arrival of particles, failures of components, or customer arrivals. One way to visualise the Poisson distribution is to plot its probability mass function (PMF), which shows the probability of each possible number of events occurring in a given interval. In Python, we can use the SciPy library to generate the PMF of a Poisson distribution and then use Matplotlib ... Read More

Count Unique Values in a Pandas GroupBy Object

Mukul Latiyan
Updated on 03-Aug-2023 18:02:06

14K+ Views

In data analysis, it's often necessary to count the number of unique values in a pandas Groupby object. Pandas Groupby object is a powerful tool for grouping data based on one or more columns and performing aggregate functions on each group. By counting the number of unique values in a Groupby object, we can gain insights into the diversity and distribution of the data within each group. To count unique values in a pandas Groupby object, we need to use the nunique() method. This method returns the number of unique values in each group of the Groupby object. We can ... Read More

Count Duplicates in Pandas DataFrame

Mukul Latiyan
Updated on 03-Aug-2023 18:00:03

9K+ Views

Pandas is a popular Python library used for data manipulation and analysis. One common task in data analysis is to count the number of duplicate values in a Pandas DataFrame. Duplicates can occur when multiple rows have the same values in all columns, or in a subset of columns. There are different ways to count duplicates in a Pandas DataFrame, depending on the specific requirements of the analysis. One common approach is to use the duplicated() method, which returns a Boolean Series indicating whether each row is a duplicate of a previous row. By default, the method considers all columns ... Read More

Make Beautiful Command Line Interfaces in Python

Mukul Latiyan
Updated on 03-Aug-2023 17:58:13

829 Views

In this article, we will learn and explore how we can create beautiful command line interfaces in Python. First, let's talk a little about Python and then we will talk about command line interfaces. Why Python? Python is a popular high−level programming language known for its simplicity, readability, and versatility. Created in the late 1980s by Guido van Rossum, Python has since become one of the most widely used languages for web development, scientific computing, data analysis, and machine learning. Python's syntax is designed to be intuitive and easy to understand, with a focus on reducing the amount ... Read More

Count Instances of a Class in Python

Mukul Latiyan
Updated on 03-Aug-2023 17:55:31

5K+ Views

In Python, counting the number of instances of a class is a common task that can be accomplished using various techniques. One straightforward approach is to use a class variable to keep track of the number of instances created. To implement this method, you can define a class variable, such as "count, " and increment it each time a new instance of the class is created. This variable can be accessed from both the class and its instances, allowing you to easily retrieve the total number of instances created. Another approach is to use the built−in function "len()" along with ... Read More

Advertisements