Can anyone help me in fixing the code


fix the code after model

There’s a number of issues with your post here:

  • Please read Getting good answers to your questions. I would suggest paying particular attention to the section ‘Help others reproduce the problem’, in the link to How do I ask a good question? at the bottom there. ‘How do I ask a good question?’ is a good guide to drafting posts in forums like this.

  • The only thing present in your post is essentially a screenshot and an ask. Screenshots alone are a no-no in forums such as these. Usually they are frowned upon in any extent in such forums; however, they can be useful for showing behaviors that code and errors alone cannot get across. This isn’t the case here. You have code and output. That should be supplied as code. I suggested above for you to pay particular attention to the section ‘Help others reproduce the problem’, in the link to How do I ask a good question? . There it stresses in bold about not using images and the title of the section touches why it isn’t a good idea.

  • Maybe most importantly in this case:
    Please, consider if this is pertinent to this forum about Jupyter? If you ran this Python code in a more traditional way, such as in the console or as the content a script you called from the command line for Python run, would it give the same outcome? (If you are new to running Python code, you may not be able to do this exercise in your mind, and should actually step through the exercise.) If so, it isn’t a Jupyter issue and so not pertinent to this forum. You’ll want to seek help in a pertinent location.

1 Like