is there a way to skip np.inf when performing a groupby().median() in pandas? My actual command is:
df_final_instgrpby=df_final_inst.groupby("psn_sector")["distance"].median().reset_index()
however np.inf are included in the computation.
Thank you