Online Learning Platform

Data Analysis Using Python > Descriptive Statistics > Reading a data file in Colab
If you are working in Google Colab and you have a Excel data file in your PC then the following codes will prompt you to upload your data in python will read your data.
 
from google.colab import files
import pandas as pd
 
uploaded = files.upload()
df = pd.read_excel(list(uploaded.keys())[0])
print(df.head())
 
 
If you already installed python in your pc then run jupyter and  your data file are in a directory/folder: i.e. /Users/mdfazlulkarimpatwary/Documents/Lectures/data Analysis Python/employees.xlsx
 
Then the following codes:
import pandas as pd

df = pd.read_excel("/Users/mdfazlulkarimpatwary/Documents/Lectures/data Analysis Python/employees.xlsx")

print(df.head())

 

No More

Next
Python code for Frequency Table of Categorical data
Feedback
ABOUT

Statlearner


Statlearner STUDY

Statlearner