parmentelat / nbautoeval

Other
19 stars 4 forks source link

compliance with panda dataframe #35

Closed shalkya closed 3 years ago

shalkya commented 3 years ago

prevent exercise_function from failing when comparing panda dataframe. The display is still bad/confusing, but at least it does work now. image

Partially fix #34

parmentelat commented 3 years ago

hi

sorry for the reaction time, that got below my radar :)

just one correction if you don't mind, I'd rather if the import of pandas could be made local to the function that needs it, so that pandas does not become a hard requirement for using the library

parmentelat commented 3 years ago

on an alternative note, I can't remember accurately but the way an ExerciseFunction instance checks for the student result being compliant with the expected result should be made a method of the class, so that we could have derived ExerciseFunction into ExerciseFunctionPandas and just redefine that one method

which does not prevent your pull request from being merged first, just a note en passant :)

parmentelat commented 3 years ago

hey - sorry for the delay

instead of your suggested change I have gone for defining a dedicated class ExerciseFunctionPandas this is available in release 1.7.0 that I have just published on pypi it will require changes in your code though, since you will need to explicitly pick that class when relevant let me know if that is good enough for you

shalkya commented 3 years ago

hi i'll check that out soon ! Thanks ! :)

shalkya commented 3 years ago

Hello, thanks again for that update. it works well ! :) I'm closing that PR, as it isn't needed anymore.