Skip to content

Tag: pandas

Assign multiple variables from a list of file names

I have a list of file and a list of variables names I want to assign every item in var_names a read_spss function. so that ill get Thanks Answer Like the comment above the easiest way to do this is with a dictionary. That way then you can just access it like this files[‘var1’] to get the content o…

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