Python Forum
Max recursion depth.... Error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Max recursion depth.... Error
#3
Like this?

I removed the line assigning df.groupby That was my attempt at adding the new calculated column into the output sheet...

Don't see the error occurring with the code below but there is no column added either.

thanks,
Mel

import pandas as pd



# file locations
input_file = "/Users/PYTHON/Exercise/StudentsGrades.csv"
output_file = "/Users/PYTHON/Exercise/"


df = pd.read_csv(input_file)
df.groupby(['parental level of education']).mean()
# df['New Column'] = df.groupby
df.to_csv(output_file + 'File_w_Extra_Column.csv')
Reply


Messages In This Thread
Max recursion depth.... Error - by MeloB - Feb-16-2022, 04:58 PM
RE: Max recursion depth.... Error - by ndc85430 - Feb-16-2022, 05:03 PM
RE: Max recursion depth.... Error - by MeloB - Feb-16-2022, 05:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug maximum recursion depth exceeded while calling a Python object error in python3 Prezess 4 3,811 Aug-02-2020, 02:21 PM
Last Post: deanhystad
  why this error occured in recursion ashishraikwar 1 1,805 Apr-24-2020, 11:12 AM
Last Post: buran
  Lambda function recursion error DeadlySocks 1 2,102 Apr-13-2020, 05:09 PM
Last Post: deanhystad
  Requesting help with my implementation of depth-first search tigerfuchs 6 2,654 Sep-26-2019, 05:47 AM
Last Post: perfringo
  matplotlib recursion error when repeatedly displaying a surface AdeIsHere 0 1,957 Sep-19-2019, 04:36 PM
Last Post: AdeIsHere
  RecursionError: maximum recursion depth exceeded in comparison ? leoahum 11 13,194 Mar-18-2019, 01:53 PM
Last Post: leoahum
  variable loop depth Skaperen 5 4,419 Jul-18-2018, 02:48 AM
Last Post: Skaperen
  maximum recursion depth exceeded saba_keon 3 7,491 Apr-08-2018, 07:30 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020