huber.py
import numpy as np
import pandas as pd

n = 100 # Total data points

# (x, y) data
x = np.random.standard_normal(n)
y = 2.0 * x + 1.0 * np.random.standard_normal(n)

# Convert to DataFrame
df = pd.DataFrame({"x":x, "y": y})