Python

Python

103 posts
NumPy - Join Arrays

NumPy - Join Arrays

Introduction In this tutorial, we want to join NumPy arrays along different axes. In order to do this, we use the functions hstack(), vstack() and dstack() of NumPy. Import Libraries First, we import the following python module: import numpy as np Define Data Let's consider two arrays a...

Python - Import Stock Prices from Yahoo Finance
Academy Membership Python

Python - Import Stock Prices from Yahoo Finance

Introduction In this tutorial, we want to import Stock Prices from Yahoo Finance into Python. In order to do this, we use ticker module of YFinance. YFinance The python library yfinance enables access to financial data from Yahoo Finance. Yahoo Finance provides various financial market data such as stock...

Pandas - Ordinal Encoding

Pandas - Ordinal Encoding

Introduction In this tutorial, we want to encode ordinal categorical variables of a Pandas DataFrame. In order to do this, we use the replace() method of Pandas. Import Libraries First, we import the following python modules: import pandas as pd Create Pandas DataFrame Next, we create a Pandas DataFrame with...

Pandas - One-Hot Encoding

Pandas - One-Hot Encoding

Introduction In this tutorial, we want to one-hot encode a categorical variable of a Pandas DataFrame. In order to do this, we use the get_dummies() function of Pandas. Import Libraries First, we import the following python modules: import pandas as pd Create Pandas DataFrame Next, we create a Pandas...

Pandas - Regular Expressions (Regex)

Pandas - Regular Expressions (Regex)

Introduction In this tutorial, we want to use regular expressions (regex) to filter, replace and extract strings of a Pandas DataFrame based on specific patterns. In order to do this, we use the str.contains() method, the str.replace() method and the str.extract() method of Pandas. Import Libraries First,...

Matplotlib - Barplots

Matplotlib - Barplots

Introduction In this tutorial, we want to create a Barplot. In order to do this, we use the bar() function of Matplotlib. Import Libraries First, we import the Pyplot submodule. The Pyplot submodule contains a collection of important functions such as the plot() function or the bar() function. In addition,...

Pandas - Unique Values of a DataFrame Column

Pandas - Unique Values of a DataFrame Column

Introduction In this tutorial, we want to count and get the unique values in a column of a Pandas DataFrame. In order to do this, we use the the nunique() method and the unique() method of Pandas. Import Libraries First, we import the following python modules: import pandas as pd...

Pandas - Concatenate DataFrames

Pandas - Concatenate DataFrames

Introduction In this tutorial, we want to concatenate multiple Pandas DataFrames. In order to do this, we use the the concat() function of Pandas. Import Libraries First, we import the following python modules: import pandas as pd Create Pandas DataFrames We create two Pandas DataFrames with some example data from...

You’ve successfully subscribed to Deep Learning Nerds | The ultimate Learning Platform for AI and Data Science
Welcome back! You’ve successfully signed in.
Great! You’ve successfully signed up.
Success! Your email is updated.
Your link has expired
Success! Check your email for magic link to sign-in.