# coding:utf-8
import sys
import pandas as pd

def timestamp2date(t):
    from datetime import datetime
    return datetime.fromtimestamp(t/1000).strftime('%Y-%m-%d')

if len(sys.argv) == 2:
    fname = sys.argv[1]
    df = pd.read_json(fname)

    column = df['data']['column']
    item = df['data']['item']

    dfx = pd.DataFrame({
        column[i] : [x[i] for x in item]
        for i in range(len(column))
    })
    if 'timestamp' in dfx.columns:
        dfx['date'] = dfx['timestamp'].map(lambda t : timestamp2date(t))

    name = fname.rsplit('.', 2)[0]
    dfx.to_excel(name + '.xlsx', index=False)
65b3ac3ecc25cb6997c96a199b823ff0e7b7bc3c
<mask token>

<mask token>


def timestamp2date(t):
    from datetime import datetime
    return datetime.fromtimestamp(t / 1000).strftime('%Y-%m-%d')


<mask token>

<mask token>


def timestamp2date(t):
    from datetime import datetime
    return datetime.fromtimestamp(t / 1000).strftime('%Y-%m-%d')


if len(sys.argv) == 2:
    fname = sys.argv[1]
    df = pd.read_json(fname)
    column = df['data']['column']
    item = df['data']['item']
    dfx = pd.DataFrame({column[i]: [x[i] for x in item] for i in range(len(
        column))})
    if 'timestamp' in dfx.columns:
        dfx['date'] = dfx['timestamp'].map(lambda t: timestamp2date(t))
    name = fname.rsplit('.', 2)[0]
    dfx.to_excel(name + '.xlsx', index=False)

import sys
import pandas as pd


def timestamp2date(t):
    from datetime import datetime
    return datetime.fromtimestamp(t / 1000).strftime('%Y-%m-%d')


if len(sys.argv) == 2:
    fname = sys.argv[1]
    df = pd.read_json(fname)
    column = df['data']['column']
    item = df['data']['item']
    dfx = pd.DataFrame({column[i]: [x[i] for x in item] for i in range(len(
        column))})
    if 'timestamp' in dfx.columns:
        dfx['date'] = dfx['timestamp'].map(lambda t: timestamp2date(t))
    name = fname.rsplit('.', 2)[0]
    dfx.to_excel(name + '.xlsx', index=False)

# coding:utf-8
import sys
import pandas as pd

def timestamp2date(t):
    from datetime import datetime
    return datetime.fromtimestamp(t/1000).strftime('%Y-%m-%d')

if len(sys.argv) == 2:
    fname = sys.argv[1]
    df = pd.read_json(fname)

    column = df['data']['column']
    item = df['data']['item']

    dfx = pd.DataFrame({
        column[i] : [x[i] for x in item]
        for i in range(len(column))
    })
    if 'timestamp' in dfx.columns:
        dfx['date'] = dfx['timestamp'].map(lambda t : timestamp2date(t))

    name = fname.rsplit('.', 2)[0]
    dfx.to_excel(name + '.xlsx', index=False)