• Blog
  • YouTube
  • Discord
Sponsorships
Mentorships

Python

  • Home
  • Blog
  • Python
Python

Augmented Dickey–Fuller test

May 21, 2025 Ryan Nolan No comments yet

#import pandas as pd import numpy as np import matplotlib.pyplot as plt from statsmodels.tsa.stattools import adfuller # Generate synthetic stationary and non-stationary data np.random.seed(17) # Stationary data: White noise stationary_data = np.random.normal(size=82) # Non-stationary data: Random walk non_stationary_data = np.cumsum(np.random.normal(size=82)) # Plot the data plt.figure(figsize=(10,5)) plt.subplot(1, 2, 1) plt.plot(stationary_data) plt.title(‘Stationary Data’) plt.subplot(1, 2, 2) plt.plot(non_stationary_data) […]

Python

KPSS-test

May 21, 2025 Ryan Nolan No comments yet

#import pandas as pd import numpy as np import matplotlib.pyplot as plt from statsmodels.tsa.stattools import kpss # Generate synthetic stationary and non-stationary data np.random.seed(17) # Stationary data: White noise stationary_data = np.random.normal(size=100) # Create a random walk with larger step size to make it more volatile random_walk = np.cumsum(np.random.normal(scale=2, size=n)) # Increase the scale for […]

Python

Python Validate User Input

April 4, 2025 Ryan Nolan No comments yet

Example 1 isalpha Example 2 integer Example 3 float Example 4 custom invalid characters not using isalpha Example 5 date example Define the valid months for the baseball seasonFebruary (2) to October (10)

Python

Python Zip

April 4, 2025 Ryan Nolan No comments yet

To start we’re going to create a simple dataframe in python: If you want to watch a YouTube video based around the tutorial there is one embedded slightly below. https://youtu.be/_0PJul0QTY4 Example 1 In this basic example, we have two lists. One for jersey numbers and another for quarterbacks. We will then zip these together in […]

Python

Python Enumerate

April 4, 2025 Ryan Nolan No comments yet

To start we’re going to create a simple dataframe in python: If you want to watch a video on our YouTube channel based around the tutorial it’s embedded below. https://youtu.be/ox5yrjKlkxQ Example 1 – Enumerate on List For our first example let’s Enumerate on a list. We will look at a list of sports. sports = […]

Python

Python List Comprehension

April 3, 2025 Ryan Nolan No comments yet

List Comprehension allows you to save time by creating a list in one line of code, instead of using a For loop. This is done by applying an expression to each item in the list. If you want to watch a YouTube video based around the article, we have embedded one down below. List Comprehension […]

Python

Python Dictionary Comprehension

April 3, 2025 Ryan Nolan No comments yet

In this tutorial, we are going to dive into Dictionary Comprehension. This is a way in which you can create a brand new dictionary in one line of code. There are other types of comprehension in python. In fact we have covered list comprehension in an earlier article. If you want to watch a YouTube […]

Python

Python Match Case Statement

June 19, 2024 Ryan Nolan No comments yet

The match case statement in Python introduces a powerful way to handle conditional logic, akin to the switch-case statements found in many other programming languages.  By allowing you to match values against a variety of patterns and execute code based on the first pattern that is matched, the match case statement can make your code […]

Search

Categories

  • LangChain 2
  • LeetCode 8
  • Python 8
  • Python Pandas 28
  • scikit-learn 11
  • Time Series 4
  • Uncategorized 2

Recent posts

  • Augmented Dickey–Fuller test
  • KPSS-test
  • Multicollinearity

Helping Data Professions further there careers

Important Links
  • Blog
  • Sponsorships
  • Mentorships
LinkedIn
  • Ryan Nolan
  • Matt Payne
Get in touch
  • ryannolandata@gmail.com

© Ryan & Matt Data Science

  • Terms & Conditions
  • Privacy Policy