Skip to content
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

BUG/DEPR: combine dtype fixes #13970

Closed
wants to merge 1 commit into from
Closed

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Aug 11, 2016

np.find_common_type([np.dtype('datetime64[ns]'), np.dtype('datetime64[ns]')], [])
# dtype('O')

@sinhrks sinhrks added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Dtype Conversions Unexpected or buggy dtype conversions labels Aug 11, 2016
@sinhrks sinhrks added this to the 0.19.0 milestone Aug 11, 2016
self.assertEqual(_find_common_type([dtype, dtype]), 'category')
self.assertEqual(_find_common_type([np.object, dtype]), np.object)

dtype = DatetimeTZDtype(unit='ns', tz='US/Eastern')
Copy link
Contributor

Choose a reason for hiding this comment

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

add a test for a datetime64[ns] w/tz against datetime64[ns]. (and maybe with np.object)

@jreback
Copy link
Contributor

jreback commented Aug 11, 2016

xref to #4094 (though that's another story)

@jreback
Copy link
Contributor

jreback commented Aug 11, 2016

very minor change. lgtm otherwise. ping when green.

@codecov-io
Copy link

codecov-io commented Aug 11, 2016

Current coverage is 85.28% (diff: 100%)

Merging #13970 into master will increase coverage by 0.01%

@@             master     #13970   diff @@
==========================================
  Files           139        139          
  Lines         50216      50206    -10   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42817      42818     +1   
+ Misses         7399       7388    -11   
  Partials          0          0          

Powered by Codecov. Last update 70f361b...2046cb5

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Aug 12, 2016

Not really sure we should actually deprecate DataFrame.combine. Although I have never used it, it does serve a purpose that is not possible to achieve with "the flexible arithmetic methods like add" when you pass it a custom function (unlike the deprecated combineAdd, which definitely can be done with add)

@sinhrks
Copy link
Member Author

sinhrks commented Aug 12, 2016

I've commented on the original (#10734).

@jreback
Copy link
Contributor

jreback commented Aug 12, 2016

ok, so as discussed in the issue. let's take out the combine deprecation from this PR. ping when ready.

@sinhrks
Copy link
Member Author

sinhrks commented Aug 12, 2016

Exclude combine deprecation, and now all green.

@jreback jreback closed this in 29d9e24 Aug 12, 2016
@jreback
Copy link
Contributor

jreback commented Aug 12, 2016

thanks!

Liam3851 added a commit to Liam3851/pandas that referenced this pull request Jun 19, 2018
DataFrame.combine_first was fixed in pandas-dev#13970. Fix Series using same
logic. Remove common._where_compat since it was only referred to by
Series.combine_first, name was confusing, and not necessary to the new
solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
4 participants