That is indeed one approach, but why is this preferred vs. giving the user a way to say "I know my workbook has no default style; please apply openpxyl's default"?
I expected something like pd.read_excel('foo.xlsx', style='openpyxl_default') so that I can be explicit and remove the warning, and was surprised not to find this ability. As a counter, see this proposed solution from SO where all the answers say to silence the warnings[1]:
import warnings
with warnings.catch_warnings():
warnings.simplefilter("ignore")
myexcelfile = pd.read_excel(easy_payfile, engine="openpyxl")
What if I'm reading in hundreds of files and some other warning I actually care about emerges? Other answers wrap pd.read_excel() in some other function just to handle this warning. Having the function itself address this seems cleaner in my opinion.
I'm reading that the "value" of this warning is to say, "All excel sheets should have a stylesheet and yours doesn't! But I went ahead and applied one, FYI!" Why not let me grant explicit permission to apply that default so I don't have to be warned that openpyxl is doing it anyway?
Admittedly the nuisance is minor, but results in a ton of junk output in e.g. jupyter notebooks if I'm reading in/concatenating a directory of excel files. Importing a library just to silence warnings this also feels like a nuisance, and that there's a better approach than silencing warnings.
Best,
John