I’ve really been enjoying learning about data analysis lately. Part of what’s made it so enjoyable is the use of Colab, which is Google’s version of Jupyter Notebook.
I came across a need to convert some lists of data to a CSV (comma separated values) format so I could paste it into a Google Sheet. Not finding anything online to do I decided to write my own, and here is the product.
The Colab notebook I created has been saved as a “gist”, which is GitHub’s cousin for fast and easy file storage service. The Gist website is also very popular for sharing CSV files, which this search will attest to.
You’ll notice an “Open in Colab” button at the top, which is how you will open the document. A really nice feature is that it is fully usable without needing to save the file anywhere, but for those that do want to save their work, they can, into Google Drive.
When you first run it, you’ll get a scary message that was written by Google’s lawyers. You’ll see from the source code that the notebook’s not doing anything nefarious, so just trust me and click on “Run Anyway”. 😆
This is a preview of the notebook. To open it, click here or on the filename on the bottom left corner of the preview.
Some Python programmers may want to remind me that I could have used Python’s built-in CSV library, but I felt Pandas would be faster, especially for large lists.
I hope some of you find this useful, although I’ll be happy if it gets some of you interested in Colab for Python programming or for data analysis, or even if it just introduces you to the Gist website.
You must log in to post a comment.