Question: Load zacksfc _ example.xlsx excel file. b ) Drop every column that is all nan values. c ) Count how many columns have been dropped.
Load zacksfcexample.xlsx excel file.
b Drop every column that is all nan values.
c Count how many columns have been dropped. see on far right
d Calculate of removed columns. see on far right
e Get a list of all column names from the dropped df and extract ticker 'compname', 'pertype', 'siccode', 'filingdate', 'totoperexp', 'operincome' columns only to a new DataFrame.
f Filter column pertype so only returns Q Save as a DataFrame. see newfiltereddata below
g Now filter if 'totoperexp and operincome Return a DataFrame. see newfiltereddata below
h Calculate sum and average of 'totoperexp', 'operincomesee print below
i Sort data on column totoperexp. See colsort below.
j Do a test calculation calculate totaloperexp operincome and add a column called testcalc. Also put this calculation into a function and add column called testcalcfun. see print below
k Transpose this new filtered DataFrame. see transposeddata below
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
