Skip to content

small cleanups aggregated #19328

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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 21, 2018
Merged

small cleanups aggregated #19328

merged 2 commits into from
Jan 21, 2018

Conversation

jbrockmendel
Copy link
Member

A few cleanups that I've found myself making repeatedly in WIP branches, figured it was worth pushing them to avoid cluttering diffs down the road.

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@codecov
Copy link

codecov bot commented Jan 21, 2018

Codecov Report

Merging #19328 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19328      +/-   ##
==========================================
- Coverage   91.53%   91.52%   -0.01%     
==========================================
  Files         150      150              
  Lines       48739    48725      -14     
==========================================
- Hits        44612    44595      -17     
- Misses       4127     4130       +3
Flag Coverage Δ
#multiple 89.89% <100%> (-0.01%) ⬇️
#single 41.73% <80%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/indexes/range.py 95.7% <ø> (ø) ⬆️
pandas/core/indexes/base.py 96.46% <100%> (ø) ⬆️
pandas/core/ops.py 94.95% <100%> (+1.84%) ⬆️
pandas/plotting/_converter.py 65.22% <0%> (-1.74%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1245f06...3a56faa. Read the comment docs.

@@ -4275,8 +4272,7 @@ def _ensure_index(index_like, copy=False):
def _get_na_value(dtype):
if is_datetime64_any_dtype(dtype) or is_timedelta64_dtype(dtype):
return libts.NaT
return {np.datetime64: libts.NaT,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you would make a note, we already have routines for this entire bizness of _get_na_value

pandas.core.dtypes.missing.infer_dtype_for_scalar, so these should be replaced

@jreback jreback added the Clean label Jan 21, 2018
@jreback jreback added this to the 0.23.0 milestone Jan 21, 2018
@jreback jreback merged commit d3e65a4 into pandas-dev:master Jan 21, 2018
@jreback
Copy link
Contributor

jreback commented Jan 21, 2018

thanks!

@jbrockmendel jbrockmendel deleted the cleanup branch January 23, 2018 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants