human
Solve the following python programming problem given the following code:
# %load titanic.py
from sklearn.preprocessing import StandardScaler

def make_preprocesser(training_data):
    """
    Constructs a preprocessing function ready to apply to new dataframes.

    Crucially, the interpolating that is done based on the training data set
    is remembered so it can be applied to test datasets (e.g the mean age that
    is used to fill in missing values for 'Age' will be fixed based on the mean
    age within the training data set).

    Summary by column:

    ['PassengerId',
     'Survived',    # this is our target, not a feature
     'Pclass',      # keep as is: ordinal value should work, even though it's inverted (higher number is lower class cabin)
     'Name',        # omit (could try some fancy stuff like inferring ethnicity, but skip for now)
     'Sex',         # code to 0 / 1
     'Age',         # replace missing with median
     'SibSp',
     'Parch',
     'Ticket',      # omit (doesn't seem like low hanging fruit, could look more closely for pattern later)
     'Fare',        # keep, as fare could be finer grained proxy for socio economic status, sense of entitlement / power in getting on boat
     'Cabin',       # omit (10% are missing values, could look more closely later, one idea would be to break this out into a few different boolean variables for major section, A->E)
     'Embarked']    # omit (could one-hot encode it, but can't see how this would affect survivorship, let's be lazy to start)

    Params:
        df: pandas.DataFrame containing the training data
    Returns:
        fn: a function to preprocess a dataframe (either before training or fitting a new dataset)
    """

    def pick_features(df):
        return df[['PassengerId', 'Pclass', 'Sex', 'Age', 'SibSp', 'Parch', 'Fare']]

    # save median Age so we can use it to fill in missing data consistently
    # on any dataset
    median_age_series = training_data[['Age', 'Fare']].median()

    def fix_missing(df):
        return df.fillna(median_age_series)

    def map_categorical(df):
       ...
Given the above code, generate some markdown instructions for it.
assistant
#Here is the Python program you requested.

Handling missing data, mapping categorical data and scaling
Things we need to take care of in preprocessing data:

Selecting features: after eyeballing the data, we drop a couple of columns that seem like a pain to deal with and/or are missing many values.
Missing values: it appears the only missing values (among features we're working with) are for quantitative variables. For those values, we'll replace with median value for that column.
Categorical data: we map binary variables to 0, 1
Scaling:
categorical values: we push to -1, 1
quantitative: we use scikit-learn's standard scalar to center the feature columns at mean 0 with standard deviation 1 so that the feature columns take the form of a normal distribution
note: we provide an option to not scale as it isn't necessary for tree based models

The helper method I developed to perform this scaling is below