Skip to content

Tag: pandas

Including specific strings in missing values count

I need to determine the percentage of missing and not available values. I have approx. 30 columns and data for missing are NA, ‘Information not found’ (string), and ‘Data not available’ (string). For determining the pct of missing (NA) values, I am using the following: How can I includ…

Excel column manipulation

I am trying to find cell named North and take everything below it I know that we can easily locate this using loc and iloc, but in my case it may vary every time my app opens new excel file. I tried using str.contains Answer Try with iloc and idxmax:

How to apply function vertically in df

I want to add column values vertically from top to down I tried using apply but its not working Desired output is basically adding A column values 1+2, 2+3: Answer You can apply rolling.sum on a moving window of size 2: