2021年5月1日星期六

Python Pandas DataFrame; Place to excel cells

Hello, I want to put each "0" in excel cells. How can I do this?

This is my python code for convert json to Dataframe and to excel

with urllib.request.urlopen(myurl.json") as url:          data = json.loads(url.read().decode())          df = pd.DataFrame(data)          df1 = df.stack().swaplevel()

And this is the output image.

Output image

This is how I want to do

Image, how ı want to do

And this is my json file

{"ADMİN":{"MUSTAFA SEMİH YAMAN":[null,0,0,0,0,1,0,0,1,0,0,1,1,1,1,0,0,1,0,1,0,0,1,0,1,1,1,1,1,1,0,0]}}
https://stackoverflow.com/questions/67347096/python-pandas-dataframe-place-to-excel-cells May 01, 2021 at 09:59PM

没有评论:

发表评论