This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import plotly.express as px | |
# grouping statistics | |
ds = df_all.groupby(['leiden', 'GICS Sector', 'GICS Sub-Industry'])['log_return_1mth'].count().reset_index() | |
ds.columns = ['leiden', 'GICS Sector', 'GICS Sub-Industry', 'count'] | |
# plotting sunburst | |
fig = px.sunburst( | |
ds, | |
path=[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Loading pandas dataframe as anndata | |
adata = qp.AnnData(df_fundamental_logreturn_minmax[ls_fundamental_target]) | |
# Saving raw data for visualization later | |
adata.raw = adata | |
# log(x+1) transformation for all data | |
qp.pp.log1p(adata) | |
# Standardization scaling per feature |