def hash_pandas_object(obj, index=True, encoding='<STR_LIT:utf8>', hash_key=None,<EOL>categorize=True):
from pandas import Series<EOL>if hash_key is None:<EOL><INDENT>hash_key = _default_hash_key<EOL><DEDENT>if isinstance(obj, ABCMultiIndex):<EOL><INDENT>return Series(hash_tuples(obj, encoding, hash_key),<EOL>dtype='<STR_LIT>', copy=False)<EOL><DEDENT>if isinstance(obj, ABCIndexClass):<EOL><INDENT>h = hash_array(obj.values, encoding, hash_key,<EOL>categorize).astype('<STR_LIT>', copy=False)<EOL>h = Series(h, index=obj, dtype='<STR_LIT>', copy=False)<EOL><DEDENT>elif isinstance(obj, ABCSeries):<EOL><INDENT>h = hash_array(obj.values, encoding, hash_key,<EOL>categorize).astype('<STR_LIT>', copy=False)<EOL>if index:<EOL><INDENT>index_iter = (hash_pandas_object(obj.index,<EOL>index=False,<EOL>encoding=encoding,<EOL>hash_key=hash_key,<EOL>categorize=categorize).values<EOL>for _ in [None])<EOL>arrays = itertools.chain([h], index_iter)<EOL>h = _combine_hash_arrays(arrays, <NUM_LIT:2>)<EOL><DEDENT>h = Series(h, index=obj.index, dtype='<STR_LIT>', copy=False)<EOL><DEDENT>elif isinstance(obj, ABCDataFrame):<EOL><INDENT>hashes = (hash_array(series.values) for _, series in obj.iteritems())<EOL>num_items = len(obj.columns)<EOL>if index:<EOL><INDENT>index_hash_generator = (hash_pandas_object(obj.index,<EOL>index=False,<EOL>encoding=encoding,<EOL>hash_key=hash_key,<EOL>categorize=categorize).values  <EOL>for _ in [None])<EOL>num_items += <NUM_LIT:1><EOL>hashes = itertools.chain(hashes, index_hash_generator)<EOL><DEDENT>h = _combine_hash_arrays(hashes, num_items)<EOL>h = Series(h, index=obj.index, dtype='<STR_LIT>', copy=False)<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>" % type(obj))<EOL><DEDENT>return h<EOL>
Return a data hash of the Index/Series/DataFrame

.. versionadded:: 0.19.2

Parameters
----------
index : boolean, default True
    include the index in the hash (if Series/DataFrame)
encoding : string, default 'utf8'
    encoding for data & key when strings
hash_key : string key to encode, default to _default_hash_key
categorize : bool, default True
    Whether to first categorize object arrays before hashing. This is more
    efficient when the array contains duplicate values.

    .. versionadded:: 0.20.0

Returns
-------
Series of uint64, same length as the object