Extract specific values from pandas profiling to a data frame

59 views Asked by At

I'm currently using y_data profiling to make HTML reports of only one dataframe with 5 attributes. I'd like to extract information about my correlation and arrange it in a simple dataframe. Specically, I need the variables of correlations.

I've try to do this:

profile = startups_df_model.profile_report()
profile.to_file('startups_df_model.to_html')

profset = profile.description_set
print(profset.keys())

And I've this error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [115], in <cell line: 2>()
      1 profset = profile.description_set
----> 2 print(profset.keys())

AttributeError: 'BaseDescription' object has no attribute 'keys'

I don't know how to call my data, because when I wrote

print(profset.correlations)

I've this, and doesn't incluce all the correlations, only the first raw for all

{'auto':                       EMPLOYEE  FINANCING_ROUNDS  INVESTORS    TIMING  \
EMPLOYEE                   1.0          0.457581   0.590027  0.391111   
FINANCING_ROUNDS           1.0          0.457581   0.590027  0.391111   
INVESTORS                  1.0          0.457581   0.590027  0.391111   
TIMING                     1.0          0.457581   0.590027  0.391111   
TOTAL_FUNDING_AMOUNT       1.0          0.457581   0.590027  0.391111   

                      TOTAL_FUNDING_AMOUNT  
EMPLOYEE                          0.756728  
FINANCING_ROUNDS                  0.756728  
INVESTORS                         0.756728  
TIMING                            0.756728  
TOTAL_FUNDING_AMOUNT              0.756728  }
0

There are 0 answers