import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
data = {
'State': ['FL', 'FL', 'MA', 'MA', 'MA'],
'Education': ['HS', 'BA', 'BA', 'MA', 'PHD'],
'Salary': [25000, 70000, 63000, 105000, 130000]
}
df = pd.DataFrame(data)
df
pd.get_dummies(df)
pd.get_dummies(df, drop_first=True)