简体   繁体   中英

when to pass values such as 'none' to function in python pd.read_excel()

我对一个名为read_excel()的函数有疑问,这是一个名为sheetnames的参数,我对何时应将“ none”传递给它有疑问。

You you can pass None for

Pass a None to return a dictionary of all available sheets.

check Specifying Sheets :

# Returns a dictionary of DataFrames
df = read_excel('path_to_file.xls',sheet_name=None)

But if pass string none it read sheet name called none :

df = read_excel('path_to_file.xls',sheet_name='none')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM