Mount Google Drive into Google Collab

# Mount Google Drive
from google.colab import drive
drive.mount('/content/drive')

# File Access
file_path = '/content/drive/MyDrive/MyDataset/Google_Stock_Price_Train.csv'

# Load the dataset
dataset_train = pd.read_csv(file_path)

If you’re a beginner like me, you might find yourself uploading files to Google Colab, only to come back the next day and realize you have to re-upload them. I found a simple workaround: you can mount Google Drive directly into your code so that files are always accessed via the cloud.

In the example above, this is the file name for a dataset from the Deep Learning course 😁