# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import pandas as pd
import numpy as np

compounds=pd.read_csv('/data/dharp/compounding/datasets/compounds.csv')

temp_df=compounds.loc[(compounds.modifier=='melting_n') & (compounds['head']=='pot_n')].groupby(['modifier','head','decade'])['count'].sum().to_frame()
temp_df

temp_df2=compounds.loc[(compounds.modifier=='melting_n') & (compounds['head']=='pot_n')]
naya_df=temp_df2.groupby(['modifier','head','decade','context']).sum()
naya_df

naya_df[.T.to_dict('list')

naya_df.xs(1840, level=2, drop_level=False).T.to_dict('list')



StarcoderdataJupyterScriptsDedupFiltered