Skip to content

Commit af0d0a6

Browse files
committed
Explain how to load data in Google Colab
1 parent e9e1b32 commit af0d0a6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

doc/source/user_guide/io.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6598,3 +6598,30 @@ The files ``test.pkl.compress``, ``test.parquet`` and ``test.feather`` took the
65986598
24009288 Oct 10 06:43 test_fixed_compress.hdf
65996599
24458940 Oct 10 06:44 test_table.hdf
66006600
24458940 Oct 10 06:44 test_table_compress.hdf
6601+
6602+
6603+
Connect To Google Colab
6604+
--------------------------
6605+
6606+
To uploade files in `Google Colab <https://colab.research.google.com>`__, you have a `lot of options
6607+
<https://colab.research.google.com/notebooks/io.ipynb>`__. A few recommended options:
6608+
6609+
6610+
Direct upload
6611+
''''''''''''''
6612+
Fewer steps, but your file(s) will disappear when your session ends.
6613+
6614+
1. In the Google Colab sidebar (mostly present in the left side), click the ``Files`` icon.
6615+
2. Click the ``upload`` button.
6616+
3. Select your file and its done!
6617+
6618+
Uploading from Local files using Python
6619+
'''''''''''''''''''''''''''''''''''''''
6620+
.. code-block:: python
6621+
:linenos:
6622+
6623+
from google.colab import files
6624+
uploaded = files.upload()
6625+
for fn in uploaded.keys():
6626+
print('User uploaded file "{name}" with length {length} \
6627+
bytes'.format(name=fn, length=len(uploaded[fn])))

0 commit comments

Comments
 (0)