-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[DEPR]: Remove literal string/bytes input from read_excel
, read_html
, and read_xml
#53767
Comments
3 tasks
Can work on this issue, after its triaged / approved. Unless @wence- wants to take it! |
read_excel
, read_html
, and read_xml
Thanks for that cross-ref, to broaden the scope, here's an audit of the current state of play:read_excel
, read_html
, and read_xml
take |
This was referenced Jun 22, 2023
@mroeschke with this completed can we close #5924? |
mikez
added a commit
to mikez/yfinance
that referenced
this issue
Nov 9, 2023
…recated" This addresses ranaroussi#1685 (`institutional_holders`) and also `get_earnings_dates()`. Pandas issue is found here: pandas-dev/pandas#53767 and the change in code here: https://github.com/pandas-dev/pandas/blob/5cedf87cccd77c7b4b6aaa64bfec98b32b512f68/pandas/io/html.py#L1238 As for legacy Python 2.7 support: `io.StringIO` seems to be supported in the versions I tested. See https://docs.python.org/2/library/io.html
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Following on from #52271 and #53409 (and to close out #5924), here is the state of play for IO routines in terms of what they accept as input
read_clipboard
: doesn't take input argumentread_csv
: pathlike, BinaryIO, StringIOread_excel
: pathlike, BinaryIO, engine-specific objects, literal bytesread_feather
: pathlike, BinaryIOread_fwf
: pathlike, BinaryIO, StringIOread_gbq
: SQL query (str)read_hdf
: pathlike, pytables.HDFStoreread_html
: pathlike, BinaryIO, StringIO, literal bytes, literal stringread_json
: pathlike, BinaryIO, StringIO, literal string (deprecated in DEPR: Deprecate literal json string input to read_json #53409)read_orc
: pathlike, BinaryIOread_parquet
: pathlike, BinaryIOread_pickle
: pathlike, BinaryIOread_sas
: pathlike, BinaryIOread_spss
: pathlike (pyreadstat doesn't allow reading from a buffer)read_sql_query
: SQL query (str)read_sql_table
: name of database table (str)read_stata
: pathlike, BinaryIOread_table
: pathlike, BinaryIO, StringIOread_xml
: pathlike, BinaryIO, StringIO, literal bytes, literal stringSo some, but not all, of the textual formats support reading literally, some support reading bytes as well as strings, and some of the binary formats support reading literal bytes.
Having deprecated literal input to
read_json
I suggest it makes sense to therefore also do so for:read_excel
read_html
read_xml
The text was updated successfully, but these errors were encountered: