When a user executes the Split Data feature more than once, the code generation repeats the X.sample and X.drop lines. This behavior might not be desired in the final Python code.
Possible solutions:
- Implement an application state to check if code was generated with the split method already.
- Implement a find and update method at the
CodeBlock class.
- Simply clear the
CodeBlock state after each code generation.
Example:
