I have found the following data set named ecoli.data and available in:
https://archive.ics.uci.edu/ml/machine-learning-databases/ecoli/
I would like to open it in R for making a classification task, but I would prefer to convert this document into a csv file. When I open it in word I notice that is not tab delimited, because there are like tree spaces between each row; so bottomline question is how to convert this file into csv using Excel or maybe Python.
Here are two ways to actually do that in R (that work):
with base R
with
readr
functionsUsing Python 2.7:
Rename the file to
ecoli.txt
then open it in Excel. This way you will be using the "Text Import Wizard" of Microsoft Excel that enables you to chose options like "Fixed width". Just click on "next" a few times and "finish" and you will have the data in the Excel grid. Now save it again as CSV.Use
pandas.read_table('https://archive.ics.uci.edu/ml/machine-learning-databases/ecoli/', delim_whitespace=True)