Spaces:
Build error
Build error
import pandas as pd | |
def main(): | |
corpus_df = pd.read_excel("data/migration/corpus_titoli_2013_2021_with_most_recent_years.xlsx") | |
ratings = corpus_df.groupby("Testata").first()[["Orientamento politico", "Religiosa?"]] | |
ratings.index.rename("provider", inplace=True) | |
ratings["political_stance"] = ratings["Orientamento politico"] | |
ratings["religious"] = ratings["Religiosa?"] == "religiosa" | |
ratings.drop("Orientamento politico", axis=1, inplace=True) | |
ratings.drop("Religiosa?", axis=1, inplace=True) | |
ratings.to_csv("data/migration/provider_pol_rel_ratings.csv") | |
if __name__ == "__main__": | |
main() |