Python Function definition: EOF in parsing

While creating data frames
def create_df(nRows , nCols) :
Machine throws EOS in parsing error repetitively.

Can you share the error screenshot?

What’s your code after ‘ def create_df() : ‘

Sorry for the late reply. I’ve attached the screenshot here.

The error is because you have only written the function name and nothing inside it.
Do something inside the function, for e.g.

def create_df(nRows, nCols):
        print("Inside df")

Check the video/or the notebook and complete the function as desired and then execute it.

1 Like

Thank you.

1 Like