Last active
December 25, 2020 03:40
-
-
Save hkailee/a1b5ef5289697fc78fc5a2b88760ea28 to your computer and use it in GitHub Desktop.
Loading adata and preprocessing for CharacterizingOutperformedCompanies1MonthPostCOVID19VaccineSuccess
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 | |
qp.pp.scale(adata) | |
# add a new `.obs` column for all companies called `GICS_Sector` | |
adata.obs['GICS_Sector'] = df_fundamental_logreturn['GICS Sector'].values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment