How to Import CSV files to Google colab Notebook

Опубликовано: 20 Январь 2025
на канале: Tutorials
99
1

In this video i will show you how to create a Google colab Notebook and then how to import a csv file to it.

This is the code i used in the video:

import pandas as pd

from google.colab import files
uploaded = files.upload()

import io

train_df = pd.read_csv(io.BytesIO(uploaded['train.csv']))

from google.colab import files
uploaded = files.upload()

test_df = pd.read_csv(io.BytesIO(uploaded['test.csv']))