-
Notifications
You must be signed in to change notification settings - Fork 16
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
How to apply function .preprocess and others to Pandas df? #8
Comments
Another yet related question, is it possible to add |
Actually, this is a very interesting idea. I'll try to implement this is the next version of this project: LFTK. |
I did something like this for those who may want to apply something similar.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Greetings all,
I have a large corpus zipping into a
Pandas dataframe
and I'd like to iterate text column to record the results of individual functions to separate columns. As far as I get,extractor
only acceptsstr
. I am trying to merge scores with metadata included in the dataframe.For instance, my dataframe is follows.
Is there a way to apply LingFeat function to df['text_field'] and record scores (let's say LingFeat.EnDF_()) as tuples into another column?
I did try
df['LingFeat'] = df['text_field'].apply(lambda x: extractor.pass_text(x))
and the result is
I couldn't go on any further. How should I do it, if it is possible?
The text was updated successfully, but these errors were encountered: