1
votes

After renaming the entries in rows, I am facing "RecursionError: maximum recursion depth exceeded while calling a Python object"

data3['X_ISP_DSPCH_DESC'] = data3['X_ISP_DSPCH_DESC'].replace
    ({'Cancellation Comments': '1', 
    'Cancellation Comments: Invalid Address': '2',
    'Cancellation Comments: Invalid Parts': '3',
    'Cancellation Comments: Invalid Service Type/Options': '4',
    'Cancellation Comments: IT/Systemic issue':'5', 
     })

data3['X_ISP_DSPCH_DESC'].head()

Error:

    255         return format_array(values_to_format, None,
--> 256                             float_format=self.float_format, na_rep=self.na_rep)
    257 
    258     def to_string(self):

... last 13 frames repeated, from the frame below ...

~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\io\formats\format.py in format_array(values, formatter, float_format, na_rep, digits, space, justify, decimal, leading_space)
    905                         leading_space=leading_space)
    906 
--> 907     return fmt_obj.get_result()
    908 
    909 

RecursionError: maximum recursion depth exceeded while calling a Python object
1
it renames successfully but when I want to see the renamed rows it throw error.Kindly suggest. - anil

1 Answers

0
votes

Please try adding above to head() in your case

import sys
sys.setrecursionlimit(1500)