C2W2_Assignment: Transformed data output missing categoricals

Why are the categorical features not showing in my output? At this section Exercise 6 in my code I set outputs[_transformed_name(key)] equal to the list of inputs sliced on the same ‘key.’ (pseudocode as not to violate community forum law)

# Keep the features as is. No tft function needed.
#for key in _CATEGORICAL_FEATURE_KEYS:
    outputs[_transformed_name(key)] = None

Output:

> transformed_data
[{'clouds_all_xf': 1.0,
  'holiday_xf': 0,
  'rain_1h_xf': 0.0,
  'snow_1h_xf': 0.0,
  'temp_xf': 0.0,
  'traffic_volume_xf': 0,
  'weather_description_xf': 0,
  'weather_main_xf': 0}]

Expected output:

[{'clouds_all_xf': 1.0,
  'day_of_week_xf': 4,
  'day_xf': 8,
  'holiday_xf': 0,
  'hour_xf': 15,
  'month_xf': 1,
  'rain_1h_xf': 2,
  'snow_1h_xf': 0.0,
  'temp_xf': 0.0,
  'traffic_volume_xf': 0,
  'weather_description_xf': 0,
  'weather_main_xf': 0}]

Thanks for helping me

The grader gave 0 points for the function. My notebook is wursdicxtfbb if you will kindly take a look. Thank you

Failed test case: transformed_data incorrectly defined (showing changed values with respect to correct answer).
Expected:
{},
but got:
{"root[0]['rain_1h_xf']": {'new_value': 1, 'old_value': 0.0}, "root[1]['rain_1h_xf']": {'new_value': 1, 'old_value': 0.0}, "root[2]['rain_1h_xf']": {'new_value': 1, 'old_value': 0.0}, "root[3]['rain_1h_xf']": {'new_value': 2, 'old_value': 0.25}, "root[4]['rain_1h_xf']": {'new_value': 2, 'old_value': 0.98}}.

Failed test case: transformed_metadata.schema incorrectly defined (showing changed values with respect to correct answer).
Expected:
{},
but got:
{"root['feature'][1]['name']": {'new_value': 'day_of_week_xf', 'old_value': 'holiday_xf'}, "root['feature'][2]['name']": {'new_value': 'day_xf', 'old_value': 'rain_1h_xf'}, "root['feature'][2]['type']": {'new_value': 'INT', 'old_value': 'FLOAT'}, "root['feature'][3]['name']": {'new_value': 'holiday_xf', 'old_value': 'snow_1h_xf'}, "root['feature'][3]['type']": {'new_value': 'INT', 'old_value': 'FLOAT'}, "root['feature'][4]['name']": {'new_value': 'hour_xf', 'old_value': 'temp_xf'}, "root['feature'][4]['type']": {'new_value': 'INT', 'old_value': 'FLOAT'}, "root['feature'][5]['name']": {'new_value': 'month_xf', 'old_value': 'traffic_volume_xf'}, "root['feature'][6]['name']": {'new_value': 'rain_1h_xf', 'old_value': 'weather_description_xf'}, "root['feature'][7]['name']": {'new_value': 'snow_1h_xf', 'old_value': 'weather_main_xf'}, "root['feature'][7]['type']": {'new_value': 'FLOAT', 'old_value': 'INT'}}.

Please click my name and message your notebook as an attachment.

This has been solved by balaji.ambresh, there was a stray “#” giving the error. Thanks.