-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom feature types in load_dataset
from CSV
#623
Comments
Currently from datasets import load_dataset
dataset = load_dataset('csv', data_files=file_dict, delimiter=';', column_names=['text', 'label'])
dataset.cast_(emotion_features) |
Thanks for the clarification! |
Hi @lhoestq we've tried out your suggestion but are now running into the following error:
Looking at the types in
Did we define the |
In general, I don't think there is any hard reason we don't allow to use Should I add it? |
Sure let's add it. Setting the convert options should do the job
Thanks for reporting, that's a bug :) I'm fixing it right now |
PR is open for the I'm adding the features parameter to csv |
Thanks a lot for the PR and quick fix @lhoestq! |
I am trying to load a local file with the
load_dataset
function and I want to predefine the feature types with thefeatures
argument. However, the types are always the same independent of the value offeatures
.I am working with the local files from the emotion dataset. To get the data you can use the following code:
The first five lines of the train set are:
Here the code to reproduce the issue:
Observed behaviour:
Expected behaviour:
Things I've tried:
int64
Am I missing anything? Thanks for any pointer in the right direction.
The text was updated successfully, but these errors were encountered: