Python Forum
How to count value after a textblob
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to count value after a textblob
#1
Hello there,

I made a textblob with this piece of code : info = dataextract['Produit'] .apply(lambda x: TextBlob(x).ngrams(3))

My variable Produit -> https://image.noelshack.com/fichiers/201...apture.png There are more row of course.

I obtained this : https://image.noelshack.com/fichiers/201...pture1.png

I want to count all the occurence of my values in this list but all I get is 'TypeError: unhashable type: 'list''

So I tried this : tf1 = infoframe.apply(lambda x: pd.value_counts(x))

And I obtained this : https://image.noelshack.com/fichiers/201...pture2.png

But that's not exactly what I wanted, I want all the occurence for each term in []
Like all the occurence for [Samsung, Galaxy, S8]

I don't know if I'm clear but if you have any idea, don't hesitate to tell me about.

Thanks :)
Reply


Messages In This Thread
How to count value after a textblob - by LoliMarth - Mar-20-2019, 09:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Row Count and coloumn count Yegor123 4 1,341 Oct-18-2022, 03:52 AM
Last Post: Yegor123
  Issue In Loading Textblob in jupyter Shivi_Bhatia 1 6,859 Apr-01-2019, 06:50 PM
Last Post: perfringo
  How to declare TextBlob var 3115Tech 2 2,741 Apr-21-2018, 07:04 PM
Last Post: 3115Tech
  Textblob issue on 3.5 Sebt1890 2 2,842 Mar-01-2018, 09:39 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020