Remove number of deprecated parameters/functions/classes [fix #6641] by jsexauer · Pull Request #6813 · pandas-dev/pandas (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation25 Commits1 Checks0 Files changed
Conversation
This file contains hidden or 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
[ Show hidden characters]({{ revealButtonHref }})
Fixes #6641
Line numbers as of commit 70de129:
Deprecated since 0.11 or before
The following are fixed in this PR:
- Deprecate precision in favor of accuracy (Tweak DataFrame formatting to always use same # of digits #395) -- v0.7.0
.\pandas\core\format.py:{2143} - Deprecate force_unicode (Unicode : change df.to_string() and friends to always return unicode objects #2224, BUG: series tidy_repr UnicodeDecodeError #2225) -- v0.10.0
.\pandas\core\format.py:{442, 369}
.\pandas\core\frame.py:{1387, 1342, 1283} - Deprecate nanRep in favor of na_rep (nanRep argument deprecation + FutureWarning #275) -- v0.5.0
.\pandas\core\frame.py:{1285, 1133}
.\pandas\core\series.py:{910} - Deprecate unique in HDFStore (ENH: In HDFStore, add select_column method, deprecate unique method #3256) -- v0.11.0
.\pandas\io\pytables.py:{691} - Deprecate time_rule favor freq (API deprecations (time_rule -> freq) with moving window functions #1042) -- v0.8.0
.\pandas\stats\moments.py:{554} - Deprecate inferTimeRule in favor of infer_freq (Add more robust frequency inference function #391) -- v0.8.0
.\pandas\tseries\frequencies.py:{247} - Deprecate DateRange in favor of DatetimeIndex (no issue number, commit 6fe2db5) -- v0.8.0
.\pandas\core\daterange.py:{24} (will be done in DEPR: Deprecate DateRange #6816) - Deprecate 'name' in favor of 'symbols' (no issue, commit b921d1a) -- v0.11.0
.\pandas\io\data.py:{344} - Deprecate offset in favor of freq (no issue, commit 3136390) -- v0.8.0
.\pandas\tseries\index.py:{180}
Deprecated since 0.12 or after
Issue #6581 documents the following for future removal. These are not included in this PR
Deprecate na_last in favor of na_position (EHN/FIX: Add na_last parameter to DataFrame.sort. Fixes GH3917 #5231, BUG: Nested sort with NaN #3917)
.\pandas\core\series.py:{1770}Deprecate rolling_corr_pairwise and expanding_corr_pairwise (Pairwise versions for rolling_cov, ewmcov and expanding_cov #4950)
.\pandas\stats\moments.py:{301,957}Deprecate broadcasting TimeSeries along DataFrame index (Broadcasting bug with datetime.date index? #2304)
.\pandas\core\frame.py:{2837}Deprecate load and save in favor of pickle and to_pickle (CLN deprecate save&load in favour of to_pickle&read_pickle #3787)
.\pandas\core\common56.py:{2740, 2756}
.\pandas\core\generic.py:{960, 967}Deprecate timeRule and offset in favor of freq (tshift does not work for Panels #4853, Panel tshift 4853 #4864)
.\pandas\core\datetools.py:{55}Deprecate colSpace in favor of col_space (no issue, commit 4a5a677)
.\pandas\core\frame.py:{1292,1346,1392}Deprecate year/month parameters in finance option signatures (Change Finance Options signatures and deprecate year/month parameters #3822, backwards compatible refactoring of io/data options functionality #3817)
.\pandas\io\data.py:{588,811,848}Remove kind from read_excel (CLN: Remove unused and undocumented kind keyword from read_excel #4713)
.\pandas\io\excel.py:{103}Deprecate infer_types to have no effect (REF/BUG/ENH/API: refactor read_html to use TextParser #4770)
.\pandas\io\html.py:{830}Deprecate table keyword in HDFStore (API: remove the table keyword, replaced by fmt='s|t' #4645)
.\pandas\io\pytables.py:{1124}
Wanted to double-check that you want me to remove DateRange
as it will be a more significant undertaking than the other ones. In addition to being available at the base of the API, it's used throughout the codebase, so I'll have to refactor all that too. Not a problem to do, but wanted to double-check before doing so.
can certainly leave that for now
but do it a separate pr if u can
it's just really a name for DatetimeIndex
FYI also need to check/update vbenches for any of these deprs
@jsexauer - let's leave out deprecating DateRange
for another issue so we can make this a minor change that we can accept. If it's still used within pandas and on the vbenches, it doesn't really feel like DateRange
is deprecated.
i.e. you can just open a separate PR that handles the refactor and deprecation for DateRange
.
yearfirst=yearfirst) |
---|
else: |
data = tools.to_datetime(data, errors='raise') |
data.offset = offset |
data.offset = freq |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is slightly confusing to me - we deprecated offset
as a parameter but not the actual offset
property on the object?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I will do the DateRange
one next. Just made a small change I saw in updating the docs (shouldn't affect tests). I think this one is ready for closing; let me know if more work is needed.
can you edit #6581 to update the >= 0.12 (that we are going to deprecate in the future)?
thanks
Looks good, but I don't see the html.py
removal listed in the task list.
@cpcloud It is the second to last item in the "Deprecated since 0.12" list. I see that the warning message says to remove in 0.14, but warning was given only in 0.13. Let me know if you want me to remove anyways.
oh ok ... you're right ... sorry i haven't looked at html stuff in a while, carry on
yep....only doing < 0.12 announced deprecations (which their are a lot!)
I'm pretty wary of removing load
and save
since they're used in The Book. I'm not sure if any of these other deprecation will affect the book but should try to avoid if possible, I guess.
save/load not on the table as those where from. 0.12
@jsexauer in the list can u out the version that the depr happened (I know I have the commit but for reference) thanks
@wesm I don't own a copy of The Book unfortunately, but assuming it was written for v0.9 (given publish in Oct 2012) the only two of these that might affect it are
- the removal of the
unique
keyword fromHDFStore.select_column
- deprecation of
name
in favor ofsymobls
inpandas.io.data.get_data_yahoo
andpandas.io.data.get_data_google
Do you know if either of these were used?
@jreback Modified inital PR comment to include versions of first deprecation. Also moved all deprecations not pulled out in this PR into #6581.
Neither of those are used in wes' book.
yep...i think this is all fine.
What should I do for the ones that that didn't have issues?
if u have a commit reference then u can use that (though u may have to do an inline reference)
if u can get it to work great if leave the existing referemce
Have an example you could point me to?
oh...looking in cookbook.rst, its just another external link. (The issues render differently/automatically, via the issue number), but a commit is just a reference like any other HTML link.