Can i import data through python code in rapidminer rather than imoorting it directly through import data button in rapidminer. if so can anyone pls provide the code ?
You should be able to do it without problems but data import in Rapidminer is one of it's strong points. What kind of file are you trying to import? With a csv file there are two ways. You can use import csv or with pandas. You will have to convert to a data frame to get the data back into Rapidminer which also means learning about data frames! There are lots of examples on the net for all these functions. I would only consider doing this if you are trying to import data in a format that is not supported by Rapidminer directly. It is much easier.
its csv file sir.sir am doing predicting student performance using data mining.can u pls send the code.
0
rfuentealbaModerator, RapidMiner Certified Analyst, Member, University ProfessorPosts: 568 Unicorn
Hi Gokz123,
Install the Python Scripting Extension. When you add a new Execute Python operator, you will have some boilerplate code that lets you open a CSV. However, as @hughesfleming68 said, you can do that easily with the Read CSV operator from RapidMiner.
I found a few cases where I had to import CSV data on streaming from an obscure protocol (not HTTP), and I think you may have this use case, so here is a picture of how the code should look like. But bear in mind that very few of us found this use case valid, hence I insist: use the Read CSV operator.
All the best,
Rodrigo.
0
sgenzerAdministrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM ModeratorPosts: 2,959 Community Manager
hi @Gokz123 just curious - why would you import data with Python rather than with RapidMiner? What are the advantages here?
Answers
Install the Python Scripting Extension. When you add a new Execute Python operator, you will have some boilerplate code that lets you open a CSV. However, as @hughesfleming68 said, you can do that easily with the Read CSV operator from RapidMiner.
I found a few cases where I had to import CSV data on streaming from an obscure protocol (not HTTP), and I think you may have this use case, so here is a picture of how the code should look like. But bear in mind that very few of us found this use case valid, hence I insist: use the Read CSV operator.
All the best,
Rodrigo.
Scott