Options

[Execute python] meta data error

YunJeong_KangYunJeong_Kang Member Posts: 7 Learner I

I used the Titanic data provided as sample data.
I plan to do simple preprocessing in RM and build the model using Execute python.
However, when I connect the data, this error appears.
Please help if there is a way to resolve this error.
Has anyone tried using taitanic data to build a model in Python after preprocessing in RM? If so please tell me how


I captured the preprocessed data and error messages.


Answers

  • Options
    rjones13rjones13 Member Posts: 176 Unicorn
    Hi @YunJeong_Kang,

    Rather than applying the data to the 'scr' input which is the script input, you should connect it to the 'inp' field. I'd recommend the tutorials for Execute Python to see this in action.

    Best,

    Roland
  • Options
    YunJeong_KangYunJeong_Kang Member Posts: 7 Learner I
    @rjones13

    Thank you for your reply.
    I tried that. I also watched the tutorial and tried it too.
    But I guess the method of loading the data was wrong.

    I will attach an image. Can you help me?



  • Options
    rjones13rjones13 Member Posts: 176 Unicorn
    Hi @YunJeong_Kang,

    There is a mandatory function, rm_main, which needs to be included in your script. If you drag on a new Execute Python operator, you will see a simple example of the required syntax.

    I think what you will require for the lower half of your scripts after doing library imports is:
    def rm_main(data):
       target = data['Survived']
       taitanic = data.drop(columns='Survived')
    ...

    and so on.

    Hope this helps.

    Best,

    Roland
Sign In or Register to comment.