import pandas as pd
from sklearn import preprocessing
lb = preprocessing.LabelBinarizer()
id, status = [1, 2, 3, 4, 5], ['Y', 'N', 'Y', 'N', 'Y']
data = [[i, j] for i, j in zip(id, status)]
df = pd.DataFrame(data, columns=['id', 'status'])
lb.fit_transform(df['status'])
print(lb.transform(df['status']))
print(lb.classes_)

07ca8d3b139d1cc3c613a97b133c073a4dd6dfd7
<mask token>

<mask token>
lb.fit_transform(df['status'])
print(lb.transform(df['status']))
print(lb.classes_)

<mask token>
lb = preprocessing.LabelBinarizer()
id, status = [1, 2, 3, 4, 5], ['Y', 'N', 'Y', 'N', 'Y']
data = [[i, j] for i, j in zip(id, status)]
df = pd.DataFrame(data, columns=['id', 'status'])
lb.fit_transform(df['status'])
print(lb.transform(df['status']))
print(lb.classes_)

import pandas as pd
from sklearn import preprocessing
lb = preprocessing.LabelBinarizer()
id, status = [1, 2, 3, 4, 5], ['Y', 'N', 'Y', 'N', 'Y']
data = [[i, j] for i, j in zip(id, status)]
df = pd.DataFrame(data, columns=['id', 'status'])
lb.fit_transform(df['status'])
print(lb.transform(df['status']))
print(lb.classes_)
