Skip to content

BUG/API: Return a Series from DataFrame.asof with no match #15232

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 26, 2017

Conversation

chris-b1
Copy link
Contributor

@chris-b1 chris-b1 commented Jan 26, 2017

Technically this is an API change, but more of a bug so didn't think there was a need to warn / deprecate?

Also there seems to be room to clean up the whole asof implementation, xref #10343, but wanted to keep that separate

@@ -67,6 +68,22 @@ def test_subset(self):

assert_frame_equal(result, expected)

def test_missing(self):
# GH 15118
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a 1-liner describing this test (what its doing)

@@ -327,7 +327,7 @@ Other API Changes
- ``pd.read_csv()`` will now raise a ``ValueError`` for the C engine if the quote character is larger than than one byte (:issue:`11592`)
- ``inplace`` arguments now require a boolean value, else a ``ValueError`` is thrown (:issue:`14189`)
- ``pandas.api.types.is_datetime64_ns_dtype`` will now report ``True`` on a tz-aware dtype, similar to ``pandas.api.types.is_datetime64_any_dtype``

- ``DataFrame.asof`` will return a null filled ``Series`` instead the scalar ``NaN`` if a match is not found (:issue:`15118`)
Copy link
Contributor

Choose a reason for hiding this comment

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

DataFrame.asof()

@jreback jreback added Bug Datetime Datetime data dtype labels Jan 26, 2017
@jreback
Copy link
Contributor

jreback commented Jan 26, 2017

minor comments, lgtm.

ok on the API change (usually these are more 'visible' even if its a 'bug fix')

@jreback
Copy link
Contributor

jreback commented Jan 26, 2017

merge on green.

@jreback jreback added this to the 0.20.0 milestone Jan 26, 2017
@codecov-io
Copy link

codecov-io commented Jan 26, 2017

Current coverage is 86.31% (diff: 100%)

Merging #15232 into master will increase coverage by <.01%

@@             master     #15232   diff @@
==========================================
  Files           139        139          
  Lines         51091      51094     +3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          44099      44102     +3   
  Misses         6992       6992          
  Partials          0          0          

Powered by Codecov. Last update 2619ee3...5c1befe

@chris-b1 chris-b1 merged commit 53bc3ca into pandas-dev:master Jan 26, 2017
AnkurDedania pushed a commit to AnkurDedania/pandas that referenced this pull request Mar 21, 2017
…v#15232)

* BUG/API: Return a Series from DataFrame.asof no match

* doc fixups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: Return type of DataFrame.asof
3 participants