Here is my Python question:
I am asked to generate an output table which contains the number of Nan in each variables (there are more than 10 variables in the data), min, max, mean, std, 25%, 50%,and 70%. I used the describe function in panda to created the describe table which gave me everything i want but the number of Nan in each variables. I am thinking about adding the number of Nan as a new row into the output generated from the describe output.
Anyone can help with this?
output = input_data.describe(include=[np.number]) # this gives the table output
count_nan = input_data.isnull().sum(axis=0) # this counts the number of Nan of each variable
How can I add the second as a row into the first table?