The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Import function from other Python file

greengreen Member Posts: 2 Learner I
edited August 2021 in Help
I'm new to RapidMiner and I'm trying to use the Python Transfomer. I've been able to import libraries installed in my Anaconda environments. However, I want to import a function from another Python file (.py script) I have locally in my computer to be used in the Python Transformer. Is there any way I can do this?

Thanks in advance! Any help would be appreciated!

Best Answer

  • kaymankayman Member Posts: 662 Unicorn
    Solution Accepted
    You can use sys to achieve this, then you just reference to the location of your script.

    like : 

    import sys
    sys.path.append('c:/some_folder/my_script')


Answers

  • greengreen Member Posts: 2 Learner I
    Works perfectly! Thank you so much!
Sign In or Register to comment.