Skip to content

Tag: pandas

Replace multiple strings in place that match

I want to replace multiple strings in my list of dataframes that match. I cannot get these to match and replace in place, instead it produces additional row entries. Here’s the example data: I know that int_text is the same as extract_text, but in some instances I may only have one np.log for clean_text…

Dealing with huge pandas data frames

I have a huge database (of 500GB or so) an was able to put it in pandas. The databasse contains something like 39705210 observations. As you can imagine, python has hard times even opening it. Now, I am trying to use Dask in order to export it to cdv into 20 partitions like this: However when I am trying to

How to divide in Panda Python

I generated the following code: In the second line of the code where I try to divide Second Dose by First Dose, I do not get the right results. Below an example of the output I get: Instead of getting 527.85 for % Partially Vaccinated I should get 5606041/5870786 = 0.95. Anyone knows what am I doing wrong in …