Skip to content

Instantly share code, notes, and snippets.

View RobMulla's full-sized avatar

Rob Mulla RobMulla

  • Washington, DC Area
View GitHub Profile
# TQDM: Python progress bar tutorial
# Youtube Video: https://www.youtube.com/watch?v=n4E7of9BINo
import pandas as pd
import numpy as np
from time import sleep
from tqdm import tqdm, trange
# Create Fake Data
dogs = np.random.choice(['labradoodle','beagle','mutt'], size=50_000)
import pandas as pd
import numpy as np
def get_dataset(size):
# Create Fake Dataset
df = pd.DataFrame()
df['size'] = np.random.choice(['big','medium','small'], size)
df['age'] = np.random.randint(1, 50, size)
df['team'] = np.random.choice(['red','blue','yellow','green'], size)
df['win'] = np.random.choice(['yes','no'], size)
import pandas as pd
import numpy as np
def get_dataset(size):
df = pd.DataFrame()
df['position'] = np.random.choice(['left','middle','right'], size)
df['age'] = np.random.randint(1, 50, size)
df['team'] = np.random.choice(['red','blue','yellow','green'], size)
df['win'] = np.random.choice(['yes','no'], size)
df['prob'] = np.random.uniform(0, 1, size)