<jupyter_start><jupyter_text>処理される前のRowDataの情報<jupyter_code>import pandas as pd

FILES = ['compbiology', 'biology', 'medicine', 'genetics', 'ntds', 'pathogenes', 'plosone', 'srep']

# edgelist acknow.
PATH_ROW_ACKNOW = '../../data/treatedEdgeList-ack_MAG'
%%time
# concat all dfs
dfs = {}
dfs_all = pd.DataFrame()
for file in FILES:
    print(f"read file: {file}")
    dfs[file] = pd.read_csv(f'{PATH_ROW_ACKNOW}/{file}.csv')[['paperId', 'author', 'acknow']]
    print(dfs[file].paperId.nunique())
    dfs_all = pd.concat([dfs_all, dfs[file]])

dfs_all.head()
print(f"# papers : {dfs_all.paperId.nunique()}")
dfs_all['pid_acknow'] = dfs_all['paperId'] + '__' + dfs_all['acknow']
print(f"# acknow: {dfs_all['pid_acknow'].nunique()}")
print(dfs_all.paperId.nunique())<jupyter_output>203428<jupyter_text>check year<jupyter_code>%%time
# concat all dfs
df_years = {}
for file in FILES:
    print(f"read file: {file}")
    df = pd.read_csv(f'{PATH_ROW_ACKNOW}/{file}.csv')
    df_years[file] = df['date'].unique()
%%time
results = {}
for file in FILES:
    results[file] = sorted({int(i) if len(str(i)) == 4 else int(str(i).split('_')[-1]) for i in df_years[file]})
for file in FILES:
    print(file)
    print(results[file], '\n')
df_years['srep']
len(str(df_years['srep'][0]))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20337682271680738, 'fraction_numerical': 0.006907137375287797, 'mean_word_length': 5.973262032085562, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '335607', 'license': 'MIT', 'n_tokens_mistral': 566, 'n_tokens_neox': 546, 'n_words': 92, 'path': 'scripts/main/.ipynb_checkpoints/2-OriginalAcknowDataStats-checkpoint.ipynb', 'repo_name': 'Keygoksmg/acknow-identification', 'size': '1303'}