<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
I'd like to use LabelEncoder to transform a dataframe column 'Sex', originally labeled as 'male' into '1' and 'female' into '0'.
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import pandas as pd
from sklearn.preprocessing import LabelEncoder
df = load_data()
le = LabelEncoder()
transformed_df = df.copy()
transformed_df['Sex'] = le.fit_transform(df['Sex'])
<END_TASK>