Also, I meant read_csv:
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.io.parsers.read_csv.html
not load_csv
On Tue, Dec 16, 2014 at 9:55 AM, Daniel Sullivan <dbsulliva...@gmail.com>
wrote:
>
> Hi Roberto,
>
> One thing you might try to get an integer instead of one-hot encoded
> values is a LabelEncoder:
>
>
> http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.LabelEncoder.html
>
> It's really useful if you process the complete dataset in memory. If you
> can't hold your complete dataset in memory, what I like to do is just use
> pythons hash function, but that has the danger of scaling the data in a
> weird way.
>
> To answer your question on loading a csv of mixed type, you can try
> numpy.array(pandas.load_csv("my_csv.csv")). This will create a numpy array
> of dtype object. From there you can select columns by doing something like
> nparray[number_column].astype(np.float64).
>
> Let me know if you have any other questions.
>
> -Danny
>
> On Tue, Dec 16, 2014 at 4:28 AM, Pagliari, Roberto <
> rpagli...@appcomsci.com> wrote:
>
>> When using OneHotEncoder, is it possible to have one integer per feature
>> as the output, as opposed to binary representation?
>>
>>
>>
>> Also, when using OneHotEncoder, what would be the method to load data
>> (.csv) with mixed type (number and categorical)?
>>
>>
>>
>> Thanks,
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Scikit-learn-general mailing list
>> Scikit-learn-general@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>
>>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general