Answers for "colab read file from colab"

1

import file to colab

from google.colab import files
files.upload()
 # run the above code and click on the enabled "Choose Files" button 

import pandas as pd
df = pd.read_csv('your uploades file name.csv') # df is a changable variable 
df.head() # shows first 5 rows
Posted by: Guest on July-26-2021
1

colab read file

from google.colab import files
import io
uploaded = files.upload()
df2 = pd.read_csv('Filename.csv')# Dataset is now stored in a Pandas Dataframe
Posted by: Guest on February-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language