Send csv from Anvil to Jupyter

Don’t worry about being new! I understand your issue now, it was partly me over-simplifying your question.

In your Jupyter code, I think you can create a pandas DataFrame outside of your function, then append to it within the @anvil.server.callable function. Something like this:

df = pd.DataFrame()

@anvil.server.callable
def pass_file(file):
   with anvil.media.TempFile(file) as filename:
      data = pd.read_csv(filename)
      df.append(data)
1 Like