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 zacksfc_example.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', 'comp_name', 'per_type', 'sic_code', 'filing_date', 'tot_oper_exp', 'oper_income'] columns only to a new DataFrame.
f) Filter column per_type so only returns Q . Save as a DataFrame. (see new_filtered_data below)
g) Now filter if 'tot_oper_exp >10000 and oper_income >10000. Return a DataFrame. (see new_filtered_data2 below)
h) Calculate sum and average of 'tot_oper_exp', 'oper_income(see print below)
i) Sort data on column tot_oper_exp. See col_sort below.
j) Do a test calculation calculate total_oper_exp oper_income and add a column called test_calc. Also put this calculation into a function and add column called test_calc_fun. (see print below)
k) Transpose this new filtered DataFrame. (see transposed_data below)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!