Skip to content

Instantly share code, notes, and snippets.

@rsalaza4
Created May 10, 2022 16:33
Show Gist options
  • Select an option

  • Save rsalaza4/02ad3dc232f4738b6a0391d55634fe4d to your computer and use it in GitHub Desktop.

Select an option

Save rsalaza4/02ad3dc232f4738b6a0391d55634fe4d to your computer and use it in GitHub Desktop.
# Import required libraries
import numpy as np
import pandas as pd
import statistics
import hvplot
import hvplot.pandas
# Set a random seed
np.random.seed(42)
# Define sample size
sample_size=5
# Generate normal distributed measures
data = np.round(np.random.normal(loc=50, scale=25, size=100),2)
# Generate sample groups
sample_group = np.repeat(range(1,21),sample_size)
# Define data frame
df = pd.DataFrame({'data':data, 'sample_group':sample_group})
df.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment