File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -6520,3 +6520,28 @@ The files ``test.pkl.compress``, ``test.parquet`` and ``test.feather`` took the
65206520 24009288 Oct 10 06:43 test_fixed_compress.hdf
65216521 24458940 Oct 10 06:44 test_table.hdf
65226522 24458940 Oct 10 06:44 test_table_compress.hdf
6523+ Loading data in Google Colab
6524+ ----------------------------
6525+
6526+ Google Colab provides two simple ways to load files into pandas: uploading
6527+ files manually or mounting Google Drive.
6528+
6529+ **Option 1: Upload a file **
6530+
6531+ .. code-block :: python
6532+
6533+ from google.colab import files
6534+ uploaded = files.upload()
6535+
6536+ import pandas as pd
6537+ df = pd.read_csv(list (uploaded.keys())[0 ])
6538+
6539+ **Option 2: Load from Google Drive **
6540+
6541+ .. code-block :: python
6542+
6543+ from google.colab import drive
6544+ drive.mount(' /content/drive' )
6545+
6546+ import pandas as pd
6547+ df = pd.read_csv(' /content/drive/MyDrive/filename.csv' )
You can’t perform that action at this time.
0 commit comments