1from google.colab import files
2files.upload()
3 # run the above code and click on the enabled "Choose Files" button
4
5import pandas as pd
6df = pd.read_csv('your uploades file name.csv') # df is a changable variable
7df.head() # shows first 5 rows
1# In case anyone else is interested to know how to import files/packages
2# from gdrive inside a google colab. The following procedure worked for
3# me:
4
5# 1) Mount your google drive in google colab:
6
7from google.colab import drive
8drive.mount('/content/gdrive/')
9
10# 2) Append the directory to your python path using sys:
11
12import sys
13sys.path.append('/content/gdrive/mypythondirectory')
14
15# Now you should be able to import stuff from that directory!