I was able to get the dataframe converted to a csv file and then converted the csv file to a blobmedia and then stuck the blobmedia object into the table and it shows up as row with the csv file in the media column. And it worked! Very pleased with that process . If anyone can suggest improvements let me know:
‘’’@anvil.server.callable
def load_data(file):
with anvil.media.TempFile(file) as file_name:
if file.content_type == ‘text/csv’:
d = pd.read_csv(file_name)
d[‘datetime2’]=pd.to_datetime(d[‘DateTime’])
else:
d = pd.read_excel(file_name)
a=d.head(10)
b=d.tail(10)
c=d.size
tdf=d.to_csv()
m=anvil.BlobMedia(‘text/plain’, tdf.encode(), name=‘junk.csv’)
app_tables.table.add_row(media=m)’’’