If I change the variable name, I get a 'type error'
I'm trying to practice Python in RM by linking the ipynb script.
However, the variable name of the sample data is not what I want, so I am trying to change the variable name and print it.
There is no error when the variable name is not changed, but an error occurs when the variable name is changed.
I just changed the variable name. What on earth does this error have to do with it?
I am attaching the code I wrote and the error message.


However, the variable name of the sample data is not what I want, so I am trying to change the variable name and print it.
There is no error when the variable name is not changed, but an error occurs when the variable name is changed.
I just changed the variable name. What on earth does this error have to do with it?
I am attaching the code I wrote and the error message.
I get a lot of help from the community. i need you. thank you


Find more posts tagged with
Sort by:
1 - 2 of
21
@rjones13 fixed it! Thank you!!
Sort by:
1 - 1 of
11
Hi @YunJeong_Kang,
Your issue stems from the second to last line, where you rename the column headers. The error message lets you know that you're passing a tuple which is an incorrect type. I would recommend either renaming outside of the Execute Python operator using the Rename operator, or modifying the command. I believe the fix is to remove the outer square brackets (I have tested this, and it works for me).
Hope this helps.
Best,
Roland
Your issue stems from the second to last line, where you rename the column headers. The error message lets you know that you're passing a tuple which is an incorrect type. I would recommend either renaming outside of the Execute Python operator using the Rename operator, or modifying the command. I believe the fix is to remove the outer square brackets (I have tested this, and it works for me).
Hope this helps.
Best,
Roland
Your issue stems from the second to last line, where you rename the column headers. The error message lets you know that you're passing a tuple which is an incorrect type. I would recommend either renaming outside of the Execute Python operator using the Rename operator, or modifying the command. I believe the fix is to remove the outer square brackets (I have tested this, and it works for me).
Hope this helps.
Best,
Roland