Skip to content

Tag: python

How to parse guess_language to read 30000 tweets?

I am using guess_language to detect the language of the tweets for a school project. I used pandas to read the .csv file. I have around 30000 rows. However, my problem is that the guess language can only read one tweet at a time. guess_language(“Top story: ‘Massive Mental Health Crisis’ “) &#8…

How to remove NaN on CSV?

I have a .csv file of a table consisting of 12 col and 30k rows. One of the col is ‘mentions’, some of the data are empty (NaN). I am trying to remove all the rows where mentions = NaN. I don’t want to fill it with new data. I just wanna remove those rows so they wont be part

How to repeat the steps

In my program I have total of 3 steps. To find the mean Split the given list using the mean value If the threshold value > epsilon then update mean value and repeat the step 2 again with updated mean value, else finished. I have achieved above two steps anyhow. Third step I have achieved only half and stru…