24 11 2021
def df_to_2d_list(df):
    keys_list = list(df.keys())
    values_list = list(df.values.tolist())
    data_2d_list = [keys_list] + values_list
    return data_2d_list
def write_list2d_to_sheet(list2d, worksheet):
    for row in range(len(list2d)):
        for column in range(len(list2d[row])):
            worksheet.write(row, column, list2d[row][column])
    return worksheet

 

延伸阅读
    < /body> < /html>