Importing existing data into Data Table

Solved my own problem.
I confused the meaning of orient , I read the pandas documentation and figured it out. This should be “records” instead of “doc_number”

2 Likes

I know this is a little old but here was my quick and dirty solution using anvil uplink, with no other pip installation required.
(I already had uplink installed, this uses the python3 build in csv library which does support column headers if you wanted to modify it to spit out a list of dictionarys instead of a list of lists, docs here: https://docs.python.org/3/library/csv.html#csv.DictReader )

On your local machine:

On your anvil app server module:

Then I just added

anvil.server.call(‘load_csv_to_data_table_from_uplink’)

…to an empty form init and set it as the startup form and ran the app once.

This is not something you would do all the time, but it might help you port some one-time reference or test data into your tables to get you started fiddling and testing.
(edited to fix quote formatting X2)

Thank you! Snippets and cloning really help learning!!in