Code by DQ shows error

Hi, I just rerun the code that DQ provided in the project,but it shows error. In the step that I tried to combine padded_csd and school code.
data["class_size"]["DBN"] = data["class_size"]["padded_csd"]+data["class_size"]["SCHOOL CODE"] then i do data['class_size'].info() , and I found no ‘SCHOOL CODE’ in the class_size data set. Anyway to fix it?

Thank you.

Screen Link:

1 Like

Without the actual error and the rest of the code it’s difficult to pinpoint the cause.

I would recommend -

  • Re-trace your steps. See whether or not you missed anything
  • Print out the column names of your dataframe corresponding to class_size and see if SCHOOL CODE is present there or not.
  • See if you accidentally modified that dataframe somewhere or not.

I ran the code on my end, and didn’t face any issues or errors. This seems more likely to be a problem somewhere else with your code. I would suggest spending some time debugging it.

1 Like


I did not do anything but ran the data after a few hours and that worked.

Thank you!!

1 Like