class_docstr: Deserialize CSV or JSON data from an inference endpoint into a pandas dataframe.
class_docstr_tok: ["Deserialize","CSV","or","JSON","data","from","an","inference","endpoint","into","a","pandas","dataframe","."]
docstr: Deserialize CSV or JSON data from an inference endpoint into a pandas dataframe.
  
  If the data is JSON, the data should be formatted in the 'columns' orient.
  See https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_json.html
  
  Args:
      stream (botocore.response.StreamingBody): Data to be deserialized.
      content_type (str): The MIME type of the data.
  
  Returns:
      pandas.DataFrame: The data deserialized into a pandas DataFrame.
docstr_tok: ["Deserialize","CSV","or","JSON","data","from","an","inference","endpoint","into","a","pandas","dataframe",".","If","the","data","is","JSON",",","the","data","should","be","formatted","in","the","'columns","'","orient",".","See","https",":","\/\/pandas.pydata.org\/pandas-docs\/stable\/reference\/api\/pandas.read_json.html","Args",":","stream","(","botocore.response.StreamingBody",")",":","Data","to","be","deserialized",".","content_type","(","str",")",":","The","MIME","type","of","the","data",".","Returns",":","pandas.DataFrame",":","The","data","deserialized","into","a","pandas","DataFrame","."]
code: def deserialize(self, stream, content_type):
      """Deserialize CSV or JSON data from an inference endpoint into a pandas dataframe.
  
      If the data is JSON, the data should be formatted in the 'columns' orient.
      See https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_json.html
  
      Args:
          stream (botocore.response.StreamingBody): Data to be deserialized.
          content_type (str): The MIME type of the data.
  
      Returns:
          pandas.DataFrame: The data deserialized into a pandas DataFrame.
      """
      if content_type == "text/csv":
          return pandas.read_csv(stream)
  
      if content_type == "application/json":
          return pandas.read_json(stream)
  
      raise ValueError(
          "%s cannot read content type %s."
          % (__class__.__name__, content_type)
      )
  
imports: from __future__ import absolute_import
  import csv
  import abc
  import codecs
  import io
  import json
  import numpy
  from six import with_metaclass
  from sagemaker.utils import DeferredError
label_desc: Use image node_id 2 for calling the PandasDeserializer obj's underlying member method code with example usage: obj.deserialize(stream, content_type) and returns: pandas, pandas