How do you get FileLink(filename) to work in Google Colab in order to generate a download link? Is there a better way than FileLink?
Right now this code generates a download link pointing to localhost:
import pandas as pd
from IPython.display import FileLink, FileLinks
df = pd.DataFrame([[1,2,3],[4,5,6]])
df.to_csv('mydf.csv', index=False)
FileLink('mydf.csv')
The link generated as output points to: https://localhost:8080/myfile.csv
How do I get it to point to the correct file?
Try:
Or, more simply, use the file browser in the left hand pane.