Last active
July 13, 2020 08:39
-
-
Save BexTuychiev/9763af5c286767a485a852eb5556b50f to your computer and use it in GitHub Desktop.
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
import pandas as pd | |
"""Option One"""" | |
# Load file as an ExcelFile object | |
excel = pd.ExcelFile('financial_sample.xlsx') | |
# Print out the sheet names | |
print(excel.sheet_names) # Prints out 'Sheet1' and 'Sheet2' | |
# Load the two sheets as individual DataFrames | |
df1 = excel.parse('Sheet1') | |
df2 = excel.parse(1) | |
"""Option Two""" | |
excel = pd.read_excel('financial_sample.xlsx', sheet_name='Sheet1') # Or sheet_name=0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment