original_docstring: Serialize entity to data description.
  
      Args:
          entity (Entity) : Instance of :class:`.Entity`.
  
      Returns:
          dictionary (dict) : Description of :class:`.Entity`.
      
docstring: Serialize entity to data description.
docstring_tokens: Serialize entity to data description .
code: def entity_to_description(entity):
      '''Serialize entity to data description.
  
      Args:
          entity (Entity) : Instance of :class:`.Entity`.
  
      Returns:
          dictionary (dict) : Description of :class:`.Entity`.
      '''
      index = entity.df.columns.isin([variable.id for variable in entity.variables])
      dtypes = entity.df[entity.df.columns[index]].dtypes.astype(str).to_dict()
      description = {
          "id": entity.id,
          "index": entity.index,
          "time_index": entity.time_index,
          "properties": {
              'secondary_time_index': entity.secondary_time_index,
              'last_time_index': entity.last_time_index is not None,
          },
          "variables": [variable.to_data_description() for variable in entity.variables],
          "loading_info": {
              'params': {},
              'properties': {
                  'dtypes': dtypes
              }
          }
      }
  
      return description
code_tokens: def entity_to_description ( entity ) : index = entity . df . columns . isin ( [ variable . id for variable in entity . variables ] ) dtypes = entity . df [ entity . df . columns [ index ] ] . dtypes . astype ( str ) . to_dict ( ) description = { "id" : entity . id , "index" : entity . index , "time_index" : entity . time_index , "properties" : { 'secondary_time_index' : entity . secondary_time_index , 'last_time_index' : entity . last_time_index is not None , } , "variables" : [ variable . to_data_description ( ) for variable in entity . variables ] , "loading_info" : { 'params' : { } , 'properties' : { 'dtypes' : dtypes } } } return description
short_docstring: Serialize entity to data description.
short_docstring_tokens: Serialize entity to data description .
comment: '''Serialize entity to data description.
  
      Args:
          entity (Entity) : Instance of :class:`.Entity`.
  
      Returns:
          dictionary (dict) : Description of :class:`.Entity`.
      '''