Found 10784 Articles for Python

Exploring Categorical Data

Mithilesh Pradhan
Updated on 09-Aug-2023 11:24:02

402 Views

Introduction Categorical data is a type of data that takes a fixed number of values and there is no possible logical order in such variables. Categorical variables can be blood groups, yes-no situations, gender, ranking (ex. first, second, third), etc. Categorical variables most of the time undergo encodings such as one hot encoding, and nominal encoding to represent them in binary or integer format for the Machine Learning use case under consideration. Categorical Data and related terms Mode is the most common central tendency associated with categorical variables/observations. It is the value in the set of observations that has the ... Read More

How to check if Time Series Data is Stationary with Python?

Niharika Aitam
Updated on 09-Aug-2023 14:34:50

204 Views

Time series is a collection of data points, which are recorded at regular intervals of time. It is used to study the trend of patterns, relationship between the variable over the defined time. The common examples of time series are stock prices, weather patterns and economic indicators. It analyzes the time series data by the statistical and mathematical techniques. The main aim of the time series is to identify the patterns and trends of the previous data to forecast the future values. The data is said to be stationary, if it doesn’t change with the time. It is necessary ... Read More

How to Check if Tensorflow is Using GPU?

Niharika Aitam
Updated on 09-Aug-2023 14:32:59

483 Views

GPU is abbreviated as Graphics Processing Unit. It is a specialized processor designed to handle the complex and repetitive calculations required for video encoding or decoding, graphics rendering and other computational intensive tasks. It is mainly suited to perform the large scale parallel computations, which makes ideal for the machine learning and other data based applications. The GPU in machine learning has become more popular as it reduces the time required to train complex neural networks. Tensorflow, Pytorch, keras are the built-in frameworks of machine learning which supports the GPU acceleration. The following are the steps to check if Tensorflow ... Read More

How to Check If Python Package Is Installed?

Niharika Aitam
Updated on 09-Aug-2023 10:57:54

2K+ Views

In Python we have a number of modules and packages which needs to be installed to work with. We have various ways to check if a python package is installed in python environment. Package is a directory which contains one or more python modules and also has the __init__.py file which is an initialization file. For using the package, we have to import it by its name. These can be inbuilt packages or allows developers to create the reusable code that can be imported into other programs by avoiding the duplicating of code. Using try and except When we ... Read More

How to check if Pandas column has value from list of string?

Niharika Aitam
Updated on 09-Aug-2023 10:52:40

2K+ Views

In pandas library, we create the data in the form of rows and columns. The columns can be of string data type. The list of strings means the list containing the string elements. Pandas is one of the libraries in python which is abbreviated as Python Data Analysis Library. It is used to perform data analysis, data cleaning, data manipulations and scientific calculations. The data in pandas library is represented in columns and rows. It has many functions and modules which are used to perform data analysis and manipulations. Python provides different ways to check if pandas column has ... Read More

How to check if an object is iterable in Python?

Niharika Aitam
Updated on 09-Aug-2023 10:36:47

582 Views

Iterable object is the object that can be iterated through all its elements using a loop or an iterable function. The lists, string, dictionary, tuples etc. are all known as iterable objects. There are different ways to check if an object is iterable or not in the Python language. Let’s see them one by one. Using a loop In python, we have two looping techniques, one is using the ‘for’ loop and the other is using the ‘while’ loop. Using any one of these two loops, we can check whether the given object is iterable or not. Example In ... Read More

How to check if an application is open in Python?

Niharika Aitam
Updated on 09-Aug-2023 10:31:35

3K+ Views

A program under execution is known as process. A process can be applications running on the current operating system or, applications related to the Operating system. If an application is related to operating system, firstly it will create a process to execute itself. The other applications rely on operating system services for execution. Most of the applications are OS services and the background applications that maintain the operating system, software and Hardware. We have different ways in python to check whether if an application is open or not. Let’s see them one by one in detail. Using ... Read More

How to check the file size?

Niharika Aitam
Updated on 09-Aug-2023 10:30:38

276 Views

Files are used to store certain data based on user requirement. A file can contain any type of information suchas audio, text, images, video or program. Depending on the data present in a file, the size of a file varies. The size of a file is measured in bits or bytes. A bit is the smallest unit of information which is typically represented by a single value: either 0 or 1. Bytes are used to measure the amount of data in a file and the bytes are denoted by 8 bits. There are several ways to check the file ... Read More

How to check Django version?

Niharika Aitam
Updated on 09-Aug-2023 10:27:23

525 Views

Django is a free, open source web framework which is written in python and works with the python language. It follows the Model view controller(MVC) architectural pattern. This is manly used to develop the web applications in an easy and faster way with minimal fuss. The key features of the Django framework are as follows. It provides Object – relational mapper (ORM) for database management. It helps in URL routing and handling of HTTP requests and responses. Provides the templating engines to generate the HTML pages. It has built-in user authentication and administration Django supports the third party modules ... Read More

How to check any script is running in linux using Python?

Niharika Aitam
Updated on 09-Aug-2023 10:25:18

3K+ Views

The psutil module in Python helps us to retrieve information about the processes that are currently running in our local system. What is a script? AScript is a set of instructions that are written in programming language and executed in the computer. We can perform a variety of simple to complex repetitive tasks within less time. In Linux, the scripts are often executed through the command line using the shell interpreters like Bash or python. These scripts can also be scheduled to run at a particular times using the cron or systemd. Installing psutil module To work with ... Read More

Advertisements