Мне нужен способ заменить некоторые элементы этого json и сохранить его обратно в виде файла Excel.
Я вроде как разбираюсь в Python, поэтому я пытался использовать библиотеки pandas и json, мне удалось открыть файл, получить данные json, перейти к значению, которое я хочу изменить, и я Я застрял. Что мне теперь делать?
Код: Выделить всё
import json
import pandas as pd
#Opening file, it has a lot of columns, so I'm taking only nescesary
data = pd.read_excel('file.xlsm', sheet_name='Sheet1', usecols='O,Q')
#Don't know what to do with it, so lets numpy take it to the next level
data_array = data.to_numpy()
#names and jsons are empty lists to store data
for row in data_array:
names.append(row[0])
jsons.append(row[1])
#I'm trying to get one record, just to find location of values to change
desc = json.loads(jsons[5])
Подробнее здесь: https://stackoverflow.com/questions/787 ... ith-python