Skip to content

Commit

Permalink
new script
Browse files Browse the repository at this point in the history
  • Loading branch information
linozen committed Jul 19, 2021
1 parent f20d23d commit c38bd1d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions generate_profiles.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
#!/usr/bin/env python3

import numpy as np
import pandas as pd
from pandas_profiling import ProfileReport

# Import dataframes
df_all = pd.read_pickle("data/all.pkl")
df_media = pd.read_pickle("data/media.pkl")
df_civsoc = pd.read_pickle("data/civsoc.pkl")

# Generate profiles
media_profile = ProfileReport(df_media, config_file="profile.yml")
all_profile = ProfileReport(df_all, config_file="profiles/profile_all.yml")
all_profile.to_file("profiles/all.html")

media_profile = ProfileReport(df_media, config_file="profiles/profile_media.yml")
media_profile.to_file("profiles/media.html")

all_profile = ProfileReport(df_all, config_file="profile.yml")
all_profile.to_file("profiles/all.html")
civsoc_profile = ProfileReport(df_civsoc, config_file="profiles/profile_civsoc.yml")
civsoc_profile.to_file("profiles/civsoc.html")

0 comments on commit c38bd1d

Please sign in to comment.