{
  "id": 102912,
  "title": "How to download the output file from the kernel?",
  "url": "/competitions/champs-scalar-coupling/discussion/102912",
  "author_name": "",
  "post_date": "2019-08-06T00:25:24.733546Z",
  "votes": null,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I tried the kernel, and the output is written in the input directory. I used markdown \n\"\"\" a href=\"../input/output.csv\"&gt; </p>",
  "messages": [
    {
      "id": "592891",
      "postDate": "08/06/2019 00:25:24",
      "content": "<p>I tried the kernel, and the output is written in the input directory. I used markdown \n\"\"\" a href=\"../input/output.csv\"&gt; </p>",
      "rawMarkdown": "I tried the kernel, and the output is written in the input directory. I used markdown \n\"\"\" a href=\"../input/output.csv\"&gt;",
      "votes": null
    },
    {
      "id": "592924",
      "postDate": "08/06/2019 01:28:43",
      "content": "<p>Try this:</p>\n\n<p>```\nfrom IPython.display import HTML\nimport base64</p>\n\n<p>def create_download_link(df, title = \"Download CSV file\", filename = \"data.csv\"): <br>\n    csv = df.to_csv(index=False)\n    b64 = base64.b64encode(csv.encode())\n    payload = b64.decode()\n    html = '{title}'\n    html = html.format(payload=payload, title=title, filename=filename)\n    return HTML(html)</p>\n\n<p>create_download_link(submission)\n```</p>\n\n<p>I copied it from the Internet, I have not tried it.</p>",
      "rawMarkdown": "Try this:\n\n```\nfrom IPython.display import HTML\nimport base64\n\ndef create_download_link(df, title = \"Download CSV file\", filename = \"data.csv\"):  \n    csv = df.to_csv(index=False)\n    b64 = base64.b64encode(csv.encode())\n    payload = b64.decode()\n    html = '<a target=\"_blank\">{title}</a>'\n    html = html.format(payload=payload, title=title, filename=filename)\n    return HTML(html)\n\ncreate_download_link(submission)\n```\n\nI copied it from the Internet, I have not tried it.",
      "votes": null
    },
    {
      "id": "592925",
      "postDate": "08/06/2019 01:29:13",
      "content": "<p>Dont write to the input directory. Just write to the default directory you start in</p>",
      "rawMarkdown": "Dont write to the input directory. Just write to the default directory you start in",
      "votes": null
    },
    {
      "id": "593184",
      "postDate": "08/06/2019 09:14:29",
      "content": "<p>go to your kernel version, there on the left side you will see a tab for output if you have saved any while your kernel complied. you can download it from there.</p>",
      "rawMarkdown": "go to your kernel version, there on the left side you will see a tab for output if you have saved any while your kernel complied. you can download it from there.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 592924,
      "author_name": "hengzheng",
      "author_url": "",
      "post_date": "08/06/2019 01:28:43",
      "content": "<p>Try this:</p>\n\n<p>```\nfrom IPython.display import HTML\nimport base64</p>\n\n<p>def create_download_link(df, title = \"Download CSV file\", filename = \"data.csv\"): <br>\n    csv = df.to_csv(index=False)\n    b64 = base64.b64encode(csv.encode())\n    payload = b64.decode()\n    html = '{title}'\n    html = html.format(payload=payload, title=title, filename=filename)\n    return HTML(html)</p>\n\n<p>create_download_link(submission)\n```</p>\n\n<p>I copied it from the Internet, I have not tried it.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 592925,
      "author_name": "returnofsputnik",
      "author_url": "",
      "post_date": "08/06/2019 01:29:13",
      "content": "<p>Dont write to the input directory. Just write to the default directory you start in</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 593184,
      "author_name": "deepak6446",
      "author_url": "",
      "post_date": "08/06/2019 09:14:29",
      "content": "<p>go to your kernel version, there on the left side you will see a tab for output if you have saved any while your kernel complied. you can download it from there.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "592891": "I tried the kernel, and the output is written in the input directory. I used markdown \n\"\"\" a href=\"../input/output.csv\"&gt;",
    "592924": "Try this:\n\n```\nfrom IPython.display import HTML\nimport base64\n\ndef create_download_link(df, title = \"Download CSV file\", filename = \"data.csv\"):  \n    csv = df.to_csv(index=False)\n    b64 = base64.b64encode(csv.encode())\n    payload = b64.decode()\n    html = '<a target=\"_blank\">{title}</a>'\n    html = html.format(payload=payload, title=title, filename=filename)\n    return HTML(html)\n\ncreate_download_link(submission)\n```\n\nI copied it from the Internet, I have not tried it.",
    "592925": "Dont write to the input directory. Just write to the default directory you start in",
    "593184": "go to your kernel version, there on the left side you will see a tab for output if you have saved any while your kernel complied. you can download it from there."
  },
  "source": "meta"
}