component_names = []
pca_df_t = pca_df.T
for col in pca_df_t:
component = pca_df_t[col]
order = component.abs().sort_values(ascending=False)
top = order.head(3)
component_name = [name if component[name] > 0 else ('neg-' + name) for name in top.index]
component_names.append('/'.join(component_name))
notebooks/dashboards-master/etc/notebooks/got_scotch_demo/scotch_analysis.ipynb
component_names = [] pca_df_t = pca_df.T for col in pca_df_t: component = pca_df_t[col] order = component.abs().sort_values(ascending=False) top = order.head(3) component_name = [name if component[name] > 0 else ('neg-' + name) for name in top.index] component_names.append('/'.join(component_name))