-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Aakash Sinha
authored
Feb 27, 2018
1 parent
77ecbfa
commit 717de5f
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Created on Tue Feb 27 16:34:44 2018 | ||
@author: Aakash Sinha | ||
""" | ||
|
||
import pandas as pd | ||
|
||
df = pd.read_excel('Schema_POData.xlsx') | ||
# This will read the first sheet into df | ||
|
||
xls = pd.ExcelFile('Schema_POData.xlsx') | ||
# This will parse the excel sheet and it is useful when we are reading dataframes in loop | ||
|
||
xls.sheet_names | ||
# This will display all the sheet names present in the Excel Sheet | ||
|
||
df = pd.read_excel('Schema_POData.xlsx', sheetname="POData") | ||
# This will read sheet "POData" from the excel file | ||
|
||
sheet_to_df_map = {} | ||
for sheet_name in xls.sheet_names: | ||
sheet_to_df_map[sheet_name] = xls.parse(sheet_name) | ||
# This will read all the sheets to a map |