# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: 'Python 3.8.5 64-bit (''my_env'': conda)'
#     name: python3
# ---

import pandas as pd
import json

csvData = pd.read_csv("waste_data.csv")

csvData.head()

csvData['id'] = csvData['id'].str.replace(' ','-')

csvData = csvData.rename(columns = {'material_info (EN)': 'material_info_EN', 'material_info (DE)': 'material_info_DE'})

csvData_idIndex = csvData.set_index('id')

csvData_idIndex.to_json('waste_data.json', orient='index')

StarcoderdataJupyterScriptsDedupFiltered