Pandas Get Dummies (One-Hot Encoding) – pd.get_dummies()

Pandas Get Dummies: This tutorial will explain how to use the pd.get_dummies() function which allows you to easily one-hot encode your categorical data. What does One-Hot encoding mean? As a data scientist or data analyst, you often work with algorithms that cannot handle categorical data (like random forest for example). Basically, these are variables that… Continue reading Pandas Get Dummies (One-Hot Encoding) – pd.get_dummies()

Published
Categorized as Python

How to Check Numpy Version in Your Python Script?

Check numpy Version: This article will detail the different methods to check the version of NumPy installed on your Python environment. Numpy Python Module The Python module numpy is a very powerful mathematical library that is used to perform various analyses and many packages are dependent on numpy (such as the Pandas module). It is often… Continue reading How to Check Numpy Version in Your Python Script?

Published
Categorized as Python

How to Get and Change the Current Working Directory in Python?

Python change working directory: This article will detail how to get the current working directory and how to change the working directory in python. How are the directories defined? For beginners in programming, a directory is nothing more or less than a folder. These directories are contained in the root (often noted C:/ or D:/… Continue reading How to Get and Change the Current Working Directory in Python?

Published
Categorized as Python

Python fromtimestamp: Get the date from a timestamp – Datetime.fromtimestamp()

Python fromtimestamp: In this article, we will learn how to compute the data corresponding to a given timestamp. Python fromtimestamp In a database, it is common to store the date and time as a timestamp. The Unix time also called Unix Timestamp is a measure of time based on the number of seconds elapsed since… Continue reading Python fromtimestamp: Get the date from a timestamp – Datetime.fromtimestamp()

Published
Categorized as Python

How to Compute the Natural Logarithm (ln) in Python

Natural log python: In this tutorial we will see how to compute the natural logarithm using the math and numpy libraries. Introduction The natural logarithm (often abbreviated ln) is the inverse of the exponential function. It is often used in mathematics for calculations involving time and growth rates. In python, several libraries allow us to… Continue reading How to Compute the Natural Logarithm (ln) in Python

Published
Categorized as Python