Created
January 20, 2024 01:50
-
-
Save celeron633/8345a441013db8fd9451b1040ce58724 to your computer and use it in GitHub Desktop.
pandas read xlsx with first row
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 os | |
import pandas as pd | |
try: | |
sheet = pd.read_excel("test.xlsx", header=None) | |
except Exception as e: | |
print('read_excel failed') | |
exit(-1) | |
print(sheet.iloc[0,0]) | |
print(sheet.iloc[0,1]) | |
print(sheet.iloc[0,2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment