FactorResults.get_loadings_frame(style='display', sort_=True, threshold=0.3, highlight_max=True, color_max='yellow', decimals=None)
[source]
get loadings matrix as DataFrame or pandas Styler
Parameters: |
|
---|---|
Returns: |
loadings – The return is a pandas Styler instance, if style is ‘display’ and at least one of highlight_max, threshold or decimals is applied. Otherwise, the returned loadings is a DataFrame. |
Return type: |
DataFrame or pandas Styler instance |
>>> mod = Factor(df, 3, smc=True) >>> res = mod.fit() >>> res.get_loadings_frame(style='display', decimals=3, threshold=0.2)
To get a sorted DataFrame, all styling options need to be turned off:
>>> df_sorted = res.get_loadings_frame(style='display', ... highlight_max=False, decimals=None, threshold=0)
Options except for highlighting are available for plain test or Latex usage:
>>> lds = res_u.get_loadings_frame(style='strings', decimals=3, ... threshold=0.3) >>> print(lds.to_latex())
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.multivariate.factor.FactorResults.get_loadings_frame.html