Reputation: 153
I have exported data to excel using pandas dataframes and my next plan is to use the data I've exported with PowerApps. However, in order to do this the data needs to be formatted as an excel table and I was wondering if there's a way to automate this?
I've had a good look around and am struggling to find anything - please bear in mind I am in no way a python pro and am very new to pandas! Here's a condensed version of what I've got so far:
import pandas as pd
list = [['big', 'nested', 'list'],['big', 'nested', 'list'], ['big', 'nested', 'list'],['big', 'nested', 'list'],['big', 'nested', 'list']]
df = pd.DataFrame(data = list, columns = ['X','Y','Z'])
writer = pd.ExcelWriter('file.xlsx', engine='xlsxwriter')
df.to_excel(writer, index = False)
writer.save()
Ideally I'd like to do this in python rather than try and merge what I've done with VBA (which would seem like the more obvious choice I'm guessing) as I've no experience whatsoever in VBA nor would know how to link the code to signal the other.. However I'm happy to hear all suggestions! Thank you very much in advance
EDIT: What i'm wondering is if there's a way to turn this:
into this
Upvotes: 4
Views: 14142