Where the file goes to after dataframe.to_csv("file name.csv")

Where the file goes to after dataframe.to_csv("file name.csv")?

if it's not on my local machine, how I can download the python notebook output?

3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Huiyue !

    We've actually just implemented this in Python Notebook! You can export a pandas Dataframe to CSV by using the following code:

    import notebooksalamode as mode
    mode.export_csv(Your_Dataframe)

    Using this code does a couple of things:

    1. In your Notebook, you'll see a button in the output cell associated with your executed code, which you can click to download the CSV
    2. The CSV is added to the bucket of files available for batch-export; you can grab all such exported DataFrames alongside the SQL results from your report

    Here's an example report that uses this code:

    https://modeanalytics.com/modeanalytics/reports/55564eba7c10/python
        
    Let us know how this works for you!
     

    Reply Like 2
  • Donna McGahan It works! Thanks a lot!

    Reply Like
  • Where can we find more documentation on this feature? We need to export many CSV files from the same report but they all have the same name. We're looking for a way to change set the .csv name for the export. 

    Reply Like
Like1 Follow
  • Status Answered
  • 1 Likes
  • 4 mths agoLast active
  • 3Replies
  • 1827Views
  • 4 Following