parameters: (data, dump_features_location)
docstring: Serialize all the features into .h5 file.
  
      :param data: data to serialize
      :param dump_features_location: path to .h5 file where the features should be saved
docstring_summary: Serialize all the features into .h5 file.
docstring_tokens: Serialize all the features into . h5 file .
function: def serialize_data(data, dump_features_location):
      """
      Serialize all the features into .h5 file.
  
      :param data: data to serialize
      :param dump_features_location: path to .h5 file where the features should be saved
      """
      training_data_for_pandas = {
          (game_id, frame_id, planet_id): planet_features
          for game_id, frame in enumerate(data)
          for frame_id, planets in enumerate(frame)
          for planet_id, planet_features in planets[0].items()}
  
      training_data_to_store = pd.DataFrame.from_dict(training_data_for_pandas, orient="index")
      training_data_to_store.columns = FEATURE_NAMES
      index_names = ["game", "frame", "planet"]
      training_data_to_store.index = pd.MultiIndex.from_tuples(training_data_to_store.index, names=index_names)
      training_data_to_store.to_hdf(dump_features_location, "training_data")
function_tokens: def serialize_data ( data , dump_features_location ) : training_data_for_pandas = { ( game_id , frame_id , planet_id ) : planet_features for game_id , frame in enumerate ( data ) for frame_id , planets in enumerate ( frame ) for planet_id , planet_features in planets [ 0 ] . items ( ) } training_data_to_store = pd . DataFrame . from_dict ( training_data_for_pandas , orient = "index" ) training_data_to_store . columns = FEATURE_NAMES index_names = [ "game" , "frame" , "planet" ] training_data_to_store . index = pd . MultiIndex . from_tuples ( training_data_to_store . index , names = index_names ) training_data_to_store . to_hdf ( dump_features_location , "training_data" )