<jupyter_start><jupyter_text><jupyter_code>import os
import openpyxl
import pprint
import json
import pandas as pd

print(pd.__version__)
# 1.2.2

df = pd.read_excel('/content/drive/MyDrive/Colab Notebooks/pre-judgit/database2020.xlsx', sheet_name='レビューシート', index_col=0)
print(df)
#         A   B   C
# one    11  12  13
# two    21  22  23
# three  31  32  33

print(type(df))
# <class 'pandas.core.frame.DataFrame'>
df.info()
df.head(3)
df.index
df_r=df.reset_index()
df_r.loc[0]['事業概要（5行程度以内。別添可）']
with open('/content/drive/MyDrive/Colab Notebooks/pre-judgit/database2020.json', 'w', encoding='utf8')as f:
  for i in range(len(df_r)):
    f.write(json.dumps({'事業名':df_r.loc[i]['事業名'], '事業概要':df_r.loc[i]['事業概要（5行程度以内。別添可）']}, ensure_ascii=False) + '\n')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1751269035532995, 'fraction_numerical': 0.044416243654822336, 'mean_word_length': 4.9772727272727275, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '460456', 'license': 'MIT', 'n_tokens_mistral': 381, 'n_tokens_neox': 367, 'n_words': 57, 'path': 'ipynb/judgit/xlsx2json.ipynb', 'repo_name': 'vdslab/t-taiki0620', 'size': '788'}