Jul-26-2018, 10:06 AM
hi friends
how can i write my sorted list to an exisitng excel file ie sheet name and column number
how can i write my sorted list to an exisitng excel file ie sheet name and column number
from openpyxl import load_workbook import pandas as pd from pandas import ExcelWriter from pandas import ExcelFile df = pd.read_excel('python.xlsx', sheet_name='Sheet1') z= list(df.names) #Column Name is imported into a List > ['Sean', 'Joyce', 'Ruby', 'Pamela'] print(sorted(z,key=len)) #sorted_words=(sorted(z,key=len)) #sorted_words.to_excel('test.xlsx')thank you for your help
:)
Python newbie trying to learn the ropes